I understand RESTful is an architecture style, but what exactly makes SOAP-based web service not count for RESTful?
It's not clear to me which points below (from Wikipedia), is not conformed by SOAP.
EDIT: I just came across this which summaries it pretty well.
REST is not RPC, RPC says, "define some methods that do something" whereas REST says, "define some resources and they will have these methods". It is a subtle but vital difference, when given a URI anyone knows they can interact with it via the predefined set of methods and receive standard HTTP responses in return. So given http://www.peej.co.uk/ I know I can issue a GET on it and receive something meaningful back. I may then try a PUT on it to change it and receive a meaningful HTTP error code since I'm not authorised to meddle with it.
SOAP vs REST: Primary Differences REST operates through a solitary, consistent interface to access named resources. It's most commonly used when you're exposing a public API over the Internet. SOAP, on the other hand, exposes components of application logic as services rather than data.
SOAP can't use REST because it is a protocol.
SOAP uses only XML for exchanging information in its message format whereas REST is not restricted to XML and its the choice of implementer which Media-Type to use like XML, JSON, Plain-text. Moreover, REST can use SOAP protocol but SOAP cannot use REST.
REST and SOAP are not equivalent concepts.
REST:
SOAP:
Items 2 and 3 in the above lists are the main points of incompatibility.
SOAP follows the RPC pattern. A SOAP API describes a series of methods, along with their parameters and return values, that you can call from your code. There's a marshaling step that converts this into it's network representation.
REST is never RPC. A REST API describes a series of resources, along with a set of verbs (typically HTTP's GET, POST, PUT, DELETE) that can act on them.
To answer your question directly: SOAP primarily violates point 6 (it doesn't provide a uniform set of verbs across APIs). It also violates point 2 (the server can maintain state for each client), and as a result point 3 as well (state prevents caching).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With