在网络服务中使用json? [英] using json in web service?

查看:120
本文介绍了在网络服务中使用json?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想使用json协议与WCF Web服务进行通信. WCF是基于SOAP的Web服务.我的问题是:
有什么办法可以使用JSON与之通信?如果不是,我是否应具有基于JSON的WCF服务,以便使用JSON发送请求和接收?还是有任何Web服务允许许多通信协议?

在此先非常感谢



I want to use json protocol to communicate with WCF web service . the WCF is a SOAP based web service . my question is :
is there any way to communicate with it using JSON? if not , should I have a WCF service based on JSON in order to send request and receive in JSON? or is there any web service allows many communication protocols?

many thanks in advance

推荐答案

您不能使Web服务使用JSON(如果尚未使用JSON的话).不要为自己烦恼,只需使用Web服务期望的东西即可.我想,如果您控制Web服务,则可以将其更改为使用JSON.我在不使用WCF的MVC内编写了发送和接收JSON的Web服务.
You can''t make the web service use JSON if it does not do so already. Don''t make things hard for yourself, just use what the web service expects. If you control the web service, you can change it to use JSON, I would think. I write web services inside MVC, not using WCF, that send and recieve JSON.


这篇关于在网络服务中使用json?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆