Please enable JavaScript.
Coggle requires JavaScript to display documents.
REST (SOAP (uses envelope with body and header inside, xml based, is a…
REST
SOAP
-
-
-
SOAP and REST can't be compared directly, since the first is a protocol (or at least tries to be) and the second is an architectural style.
-
the client needs previous knowledge on everything it will be using, or it won't even begin the interaction
REST does not need to be over HTTP, but it is the most common
REST is an architecture where resources are defined and addressed; for designing networked applications
-
REST is not restricted to XML format. REST web services can send plain text, JSON, and also XML.
client is supposed to enter a REST service with zero knowledge of the API, except for the entry point and the media type
-
a client only knows the entry point URI and the resources are supposed to return links the client should follow.
REST service is a web service, but a web service is not necessarily a REST service.
relies on a stateless, client-server, cacheable communications protocol
REST is a lightweight alternative to mechanisms like RPC (Remote Procedure Calls) and Web Services (SOAP, WSDL, et al.)
One thing that is not part of a good REST design is cookies: The "ST" in "REST" stands for "State Transfer", and indeed, in a good REST design operations are self-contained, and each request carries with it (transfers) all the information (state) that the server needs in order to complete it.
Using Web Services and SOAP, the request would look something like this:*<?xml version="1.0"?><soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope"
soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding">
<soap:body pb="http://www.acme.com/phonebook">
<pb:GetUserDetails>
<pb:UserID>12345</pb:UserID>
</pb:GetUserDetails>
</soap:Body>
</soap:Envelope>*and now REST: http://www.acme.com/phonebook/UserDetails/12345
unlike SOAP services, REST is not bound to XML in any way.
REST is based on normal HTTP requests which enables intent to be inferred from the type of request being made
A REST client needs little to no prior knowledge about how to interact with an application or server beyond a generic understanding of hypermedia. By contrast, clients and servers in some service-oriented architectures (SOA) interact through a fixed interface shared through documentation or an interface description language (IDL)