SOAP,XML-RPC和JSON有什么区别? [英] What is there difference between SOAP, XML-RPC, JSON ?

查看:171
本文介绍了SOAP,XML-RPC和JSON有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

很抱歉提出这个问题,但是我花了很多时间试图了解每个人在Web服务中的位置.我只是无法确定创建Web服务所需要使用的内容.

我知道Web服务可以基于.Net或Java或PHP.假设我想使用C#在.NET中创建Web服务.何时出现SOAP,XML-RPC或JSON?

谢谢!

解决方案

JSON是表示人类可读数据的标准.它仅代表数据,仅此而已.

SOAP是用于传输信息和调用Web服务的协议规范,并使用XML对其进行编码. SOAP通过HTTP(支持其他网络协议)工作.

XML-RPC是另一种协议,用于传输信息和调用远程过程.它不是通过HTTP运行的,而是一个不同的协议,不同的端口等.

因此,SOAP和XML-RPC之间的主要区别在于前者包装在HTTP中,而后者则没有. JSON完全不同.

I'm sorry to ask this question but I have spent hours trying to understand where each one of them fits in in a web service. I just can't wrap my head around what do I need to use to create a web service.

I know that web service can be .Net or Java or PHP based. Say I want to create a web service in .NET using C#. When do SOAP, XML-RPC or JSON come into picture?

Thank you!

解决方案

JSON is a standard to represent human-readable data. It merely represents data, nothing more.

SOAP is a protocol specification for transmiting information and calling web services, and uses XML to encode it. SOAP works over HTTP (amogst other network protocols).

XML-RPC is another protocol, used for transmiting information and calling remote procedures. It doesn't run over HTTP, but is rather a different protocol, different port, etc.

So the main difference between SOAP and XML-RPC that the former wraps inside HTTP, while the latter does not. JSON is something completely different.

这篇关于SOAP,XML-RPC和JSON有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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