Is there any benefit to use SOAP over REST?
What is REST?
REST means representational state transfer and it is architectural style. It doesn’t have so many standards like SOAP. REST is for use a public API over the internet (HTTP/S) to handle CRUD operations on data. REST is focused on accessing named resources through a single consistent interface. REST allows better support for browser clients due to it’s support for JSON. A simple is example to understand REST is to send letter directly without using any outer cover.
What is SOAP?
SOAP means simple object access protocol . SOAP is an XML-based protocol that lets you exchange info over a particular protocol (can be HTTP or SMTP, for example) between applications. It stands for Simple Object Access Protocol and uses XML for its messaging format to relay the information. Unlike REST where data is secure only in transport layer , in SOAP data is secure also after transport layer. A simple is example to understand SOAP is to send letter secure with using an outer cover.
But here a big security benefit with SOAP that I describe below:
1) While SOAP supports SSL (just like REST) it also supports WS-Security which adds some enterprise security features. 
2)  Need ACID Transactions over a service, you’re going to need SOAP. 
3) If your application needs 
Asynchronous processing and a guaranteed level of reliability and 
security. Rest doesn’t have a standard messaging system and expects 
clients to deal with communication failures by retrying.
If the security is a major concern and the resources are not limited
 then we should use SOAP web services. Like if we are creating a web 
service for banking related work then we should go with SOAP for need of higher security.
Comments
Post a Comment