Difference between SOAP vs REST
Below table lists out the difference between SOAP and REST bases APIs
Sr No. | SOAP | REST |
---|---|---|
1 | SOAP stands for Simple Object Access Protocol. | REST stands for REpresentational State Transfer. |
2 | SOAP is a protocol. | REST is an architectural style. |
3 | SOAP uses services interfaces to expose the business logic. | REST uses URI to expose business logic. |
4 | Java specification for SOAP is JAX-WS. | Java specification for REST is JAX-RS. |
5 | SOAP requires more bandwidth and resource than REST. | REST requires less bandwidth and resource than SOAP. |
6 | SOAP defines its own security to secure the message | RESTful web services inherits security measures from the underlying transport layer. |
7 | SOAP allows XML data format for data exchange. | REST allows multiple data format such as Plain text, HTML, XML, JSON etc. |
8 | SOAP is less preferred than REST. | REST more preferred than SOAP. |