Introduction
In the mad rush of implementing Rest Services, I will be discussing about key scenarios for REST Vs SOAP i.e when it is best suited to implement REST Vs SOAP or vice-versa.
Can REST fully Replace SOAP? To answer let's understand what is SOAP and REST?
SOAP – Simple Object Access Protocol.
- Exposes Operations that implements business Logic.
- It provides loose coupling to integrate hybrid systems.
- SOAP supports standard error Messaging
- Designed for:
- Extensible
- Distributed Computing
- SOAP service very well suited for Enterprise Applications needs & goals:
- Supports HTTP, SMTP, JMS
- Enterprise security with WS-Security
- Supports ACID, Atomic transactions with WS-AT
- Lot of development tools available
- Supports HHTP POST
- Supports only XML
- Supports stateless & stateful operations
- Strongly typed.
- Supports asynchronous messaging
REST – Representational State Transfer
- Exposes Resources which represent Data
- Use HTTP methods (GET/POST/DELETE)
- Based on simple Point to Point communication over HTTP.
- Stateless communication
- Supports multiple Formats
Key Advantages of REST?
- REST can be consumed by any client like web browser, AJAX, JQuery, Javascript
- REST is definitely lightweight
- Doesn't requires XML parsing
- Consumes less bandwidth
- Doesn't require SOAP header for every message.
Key Challenges with REST?
- Building a client in REST can be challenging:
- Can't generate client side artifacts from WSDL as in case of SOAP
- Need to write raw HTTP calls.
- Not many IDE available to write REST Clients
- Rest only Support HTTP / HTTPS
- REST is not secure.
- Parameters are part of the URI
- No support for acquiring tokens
- RESTFul Services has no contract.
- REST is not reliable
- REST can't be governed as it doesn't have any service registry.
What's is Verdict for REST vs SOAP?
Both REST & SOAP are best suited for following respective scenarios
| REST | SOAP |
Best Suited for:
|
Best Suited for:
|
Coming next is REST API Design, till then happy reading and blogging.

Manish KumarPosted Sep 17, 2018, 10:55 AM
Very nice Article.
Jayant KumarPosted Feb 21, 2017, 12:59 AM
SOAP cannot compare with REST as SOAP is a protocol of network communication while REST is an architecture. REST can use SOAP web services because it is a concept and can use any protocol like HTTP, SOAP. Source: https://msdn.microsoft.com/en-us/magazine/dd942839.aspx
Rajkiran SwainPosted Jul 20, 2016, 6:20 AM
Thanks
Pawan TiwariPosted Apr 18, 2016, 4:44 AM
Thanks Sir
Suhit KalubarmePosted Dec 4, 2014, 1:59 AM
Thanks Alot
JASWINDER WADALIPosted Aug 17, 2013, 8:26 AM
thanks a lot sir