What is there difference between SOAP, XML-RPC, JSON ?

夙愿已清 提交于 2019-12-22 08:57:06

问题


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!


回答1:


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.



来源:https://stackoverflow.com/questions/11270869/what-is-there-difference-between-soap-xml-rpc-json

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!