Difference between REST and SOAP
Below table describes the difference between REST and SOAP:
|REST is architectural style. It is more flexible.
|SOAP is protocol. It is highly specified.
|No Official Standard
|Has Official Standard
|Focused on accessing named resources through a single consistent interface.
|Focused on exposing pieces of application logic as server.
|Supports many formats
|Only supports XML format
|Performance and Scalability
|Better performance and scalability
|REST reads can be cached
|SOAP based reads can’t be cached
|Supports SSL in addition to XML signatures and encryption
|Limited to single HTTP transactions
REST expects client to retry during connection failure
|Ensure ACID transactions
SOAP has successful/retry logic built-in
|Areas of use
|Where high security and high reliability is not critical
|Where high security and high reliability is critical
|Require less bandwidth and resource than SOAP
|Requires more bandwidth and resource than REST
|Tied to HTTP transport model
|Both SMTP and HTTP are valid application layer protocols used as transport for SOAP
|Built-in error handling
|No error handling
|No constraints on payload
|Payload must comply with SOAP schema