Friday, January 29, 2016

SOAP vs REST

SOAP vs REST


1. SOAP stands for Simple Object Access Protocol. REST stands for REpresentational State Transfer.
2. SOAP is a XML based messaging protocol and REST is not a protocol but an architectural style.
3. SOAP has a standard specification but there is none for REST.
4. REST does not enforces message format as XML or JSON or etc. But SOAP is XML based message protocol.
5. REST follows stateless model. SOAP has specifications for stateful implementation as well.
6. SOAP is strongly typed, has strict specification for every part of implementation. But REST gives the concept and less restrictive about the implementation.
7. SOAP uses interfaces and named operations to expose business logic. REST uses (generally) URI and methods like (GET, PUT, POST, DELETE) to expose resources.
——————————————————————————————————————-
No.      SOAP                                  |                                       REST
——————————————————————————————————————-
1) SOAP is a protocol.               |  REST is an architectural style.
2) SOAP stands for Simple Object Access Protocol. | REST stands for REpresentational State Transfer.
3) SOAP can’t use REST because it is a protocol. | REST can use SOAP web services because it is a concept and can use any protocol like HTTP, SOAP.
4) SOAP uses services interfaces to expose the business logic. | REST uses URI to expose business logic.
5) JAX-WS is the java API for SOAP web services. | JAX-RS is the java API for RESTful web services.
6) SOAP defines standards to be strictly followed. | REST does not define too much standards like SOAP.
7) SOAP requires more bandwidth and resource than REST. | REST requires less bandwidth and resource than SOAP.
8) SOAP defines its own security. | RESTful web services inherits security measures from the underlying transport.
9) SOAP permits XML data format only. | REST permits different data format such as Plain text, HTML, XML, JSON etc.
10) SOAP is less preferred than REST. | REST more preferred than SOAP.
—————————————————————————————————————————————————

No comments:

Post a Comment