Why Google uses a lot of SOAP in spite of the following advantages in REST.
- REST is an architectural style.
- REST stands for REpresentational State Transfer.
- REST can use SOAP web services because it is a concept and can use any protocol like HTTP, SOAP.
- REST uses URI to expose business logic. REST uses (generally) URI and methods like (GET, PUT, POST, DELETE) to expose resources. JAX-RS is the java API for RESTful web services.
- REST does not define too much standards like SOAP.
- REST requires less bandwidth and resource than SOAP.
- RESTful web services inherits security measures from the underlying transport.
- REST permits different data format such as Plain text, HTML, XML, JSON etc.
- REST more preferred than SOAP.
- REST is an architectural style, unlike SOAP which is a standardized protocol.
- REST follows stateless model
- REST has better performance and scalability. REST reads can be cached. JSON usually is a better fit for data and parses much faster No accepted standard for a JSON schema.
SOAP
- SOAP is a protocol.
- SOAP stands for Simple Object Access Protocol.
- SOAP can't use REST because it is a protocol.
- SOAP uses services interfaces to expose the business logic. JAX-WS is the java API for SOAP web services.
- SOAP defines standards to be strictly followed.
- SOAP requires more bandwidth and resource than REST.
- SOAP defines its own security.
- SOAP permits XML data format only.
- SOAP is less preferred than REST.
- SOAP is actually agnostic of the underlying transport protocol and can be sent over almost any protocol such as HTTP, SMTP, TCP, or JMS.
- SOAP has a standard specification
- SOAP has specifications for stateful implementation as well.
- SOAP based reads cannot be cached.
- The marshalling costs are higher but one of the core advantages of XML is interoperatibility. For XML, a schema allow message formats to be well-defined. Data typing and control is also much richer under XML.
Thanks in advance.