REST vs SOAP
Difference between REST and SOAP
Below table describes the difference between REST and SOAP:
PARAMETER | REST | SOAP |
REST is architectural style. It is more flexible. | SOAP is protocol. It is highly specified. | |
Industry Standard | No Official Standard | Has Official Standard |
Focus | Focused on accessing named resources through a single consistent interface. | Focused on exposing pieces of application logic as server. |
Documentation | Easy documentation | Complex documentation |
Data Formats | Supports many formats | Only supports XML format |
Performance and Scalability | Better performance and scalability | |
Caching | REST reads can be cached | SOAP based reads can’t be cached |
Security | Supports SSL | Supports SSL in addition to XML signatures and encryption |
Reliability | 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 |
Bandwidth Requirement | Require less bandwidth and resource than SOAP | Requires more bandwidth and resource than REST |
Transport Layer | Tied to HTTP transport model | Both SMTP and HTTP are valid application layer protocols used as transport for SOAP |
Error Handling | Built-in error handling | No error handling |
Payload | No constraints on payload | Payload must comply with SOAP schema |
Source: ipwithease.com |
Continue Reading:
Understanding REST and REST API
Tag:comparison