标签云

微信群

扫码加入我们

WeChat QR Code

I have read articles about the differences between SOAP and REST as a web service communication protocol, but I think that the biggest advantages for REST over SOAP are: REST is more dynamic, no need to create and update UDDI(Universal Description, Discovery, and Integration).REST is not restricted to only XML format. RESTful web services can send plain text/JSON/XML.But SOAP is more standardized (E.g.: security).So, am I correct in these points?


There's a letter analogy that I liked a lot about SOAP vs REST, with SOAP you are using an envelope, with REST, it's a postcard, so Obviously SOAP has some extra overhead: more bandwidth(more paper), extra work for both parties(wrapping and unwrapping). But that doesn't mean REST is not as secure as SOAP since you can use HTTPS (think of it as replacing the mailman with someone who only speaks foreign languages)

2019年06月26日45分26秒

spf13.com/post/soap-vs-rest

1970年01月01日00分01秒

nishantshukla001webservices.blogspot.in/2015/09/…

2019年06月26日45分26秒

"In many ways, the World Wide Web itself, based on HTTP, can be viewed as a REST-based architecture."

2019年06月26日45分26秒

As per Richardson Maturity Model that breaks down the principal elements of a REST approach into three steps, SOAP is Level 0 REST.

2019年06月26日45分26秒

Either one is fine. The issue is how the users get the URLs, not how they use them. They should get the search url from a link in some other document, not from documentation. The documentation may explain how to use the search resource.

2019年06月26日45分26秒

Check URI templates, tools.ietf.org/html/rfc6570.

2019年06月26日45分26秒

CristiPotlog I never said SOAP is dependent on any particular protocol, I merely emphasize how REST isn't. The second link you sent says REST requires HTTP, which is wrong.

2019年06月26日45分26秒

Lets repeat that once more: HATEOAS is a constraint if you wanna call your API Restful!

2019年06月26日45分26秒

SachinKainth There's an answer for that here. You can map CRUD ops to HTTP methods, but that's not REST, because it's not the intended semantics of those methods as documented in the RFCs.

2019年06月26日45分26秒

REST does not have a predefined set of operations that are CRUD operations. Mapping HTTP methods to CRUD operations blindly is one of the most common misconceptions around REST. The HTTP methods have very well defined behaviors that have nothing to do with CRUD, and REST isn't coupled to HTTP. You can have a REST API over ftp with nothing but RETR and STOR, for instance.

2019年06月26日45分26秒

Also, what do you mean by 'REST services are idempotent'? As far as I know, you have some HTTP methods that by default are idempotent, and if a particular operation in your service needs idempotence, you should use them, but it doesn't make sense to say the service is idempotent. The service may have resources with actions that may be effected in an idempotent or non-idempotent fashion.

2019年06月26日45分26秒

cmd :please remove fourth point - "A RESTful architecture may use HTTP or SOAP as the underlying communication protocol". its a misinformation you are conveying.

2019年06月26日45分26秒

[solved]php999.blogspot.in/2015/06/soap-vs-rest-web-services.html

2019年06月25日45分26秒

Great answer but remember REST can use any transport protocol. For example, it can use FTP.

2019年06月26日45分26秒

Who said REST can't use SSL?

2019年06月26日45分26秒

To reference the point about size of XML data, when compression is enabled, XML is quite small.

2019年06月26日45分26秒

The point about the size of the payload should be deleted, it is such a one-dimensional comparison between JSON and XML and is only possible to detect in seriously optimized setups, which are far between.

2019年06月26日45分26秒

REST verbs/methods don't have a 1 to 1 relation to CRUD methods although, it can help in the beginning to understand the REST style.

2019年06月26日45分26秒

REST does not support SSL ? the uniform resource url for rest can not be start with https:// ?

2019年06月26日45分26秒

Do 3 and 6 under REST not contradict?

1970年01月01日00分03秒

We just compare the feature of each other.

2019年06月26日45分26秒