Site icon

What is difference between REST & SOAP web services.

RESTFul vs RESTLess (or SOAP) Web service:

REST and SOAP are different concepts altogether, We have summarized the few basic differences between RESTFul and SOAP web service.

S.No REST (Representational State Transfer) SOAP (Simple Object Access Protocol)
1. REST is an architectural style and REST does not adhere to any specification. SOAP is protocol and has standard protocol specifications.
2. REST follows stateless model SOAP has specifications for stateful model.
3. REST-based application are simple to implement SOAP based applications need to understand the SOAP protocol specification.
4. REST is a paradigm, where we are concerned about the resource(s). SOAP based application are concerned about the operations. The SOAP message has name of operation to be performed in web service.
5. REST supports different format like text, JSON, XML etc. SOAP supports XML only
6. REST uses HTTP/HTTPS. SOAP uses “generic” transport channel"
7. REST is limited by HTTP protocol so it’s transaction support is neither ACID (Atomicity, Consistency, Isolation, Durability) compliant nor can provide two phase commit across distributed transnational resources. SOAP has comprehensive support for both ACID based transaction management for short-lived transactions and compensation based transaction management for long-running transactions. It also supports two-phase commit  protocol across distributed resources
8. REST has better performance and scalability. REST reads can be cached SOAP based reads cannot be cached.
9. REST does n’t have a standard messaging system and expects clients to deal with communication failures by retrying. SOAP has successful/retry logic built in and provides end-to-end reliability, even through SOAP intermediaries.
Exit mobile version