REST是一种更好的Web服务方法还是SOAP?或者它们是针对不同问题的不同工具?或者这是一个细致入微的问题 - 也就是说,在某些领域比另一个稍微好一点,等等?
赏金编辑:
现在,差不多三年后,我想再次提出这个问题 - 提供奖励以鼓励深入回答.我特别感谢有关这些概念及其与PHP-universe和现代高端Web应用程序的关系的信息.
跟进此帖子的问题:
目前我对SOAP和RESTful Services之间的差异略有了解.
我的问题是我何时应该使用SOAP,何时应该使用RESTful; 在性能/速度或请求处理方面,哪一个"更好"?
我正在RESTful(java)中第一次实现,我想要了解更多; 我以前处理过SOAP.
我知道像Facebook这样的网站现在正在使用REST服务,但我想知道其他使用REST的应用程序,如果有特殊情况,使用REST比其他方法更有保证.
肥皂和休息之间有什么区别
在设置一些新的Web服务或集成环境时,会多次提出此问题.哪一个更好.
我知道一些基本的区别,如下所述:
(1)Rest is based on http protocol (get,put,post,delete) , treating everything as a resource.
whereas SOAP is transport agnostic
(2)Soap works only with xml , Rest works with json/xml both.
(3)rest do not provide schema definition when implemented as json,
Soap will always provide schema definitions.
It will be easy to understand request/response schema and
their data type constraints when viewing schema information via WSDL by any client.
(4)The step of wsdl creation makes it difficult to make …Run Code Online (Sandbox Code Playgroud)