Difference between SOAP and REST? What is the present-day significance of SOAP?
You can not compare REST and SOAP. REST is a architectural style whereas SOAP is a protocol. Unfortunately, REST became colloquial spoken an synonym for RESTful HTTP service, that means a realization of REST styled architecture with HTTP as (application) protocol. REST is based on following principles (constraints and elements) (in brackets the realization in RESTful HTTP) .
- Stateless (HTTP is a stateless protocol)
- Resource (identified by URIs)
- Uniform Interface (HTTP Methods)
- Representation (MIME-TYPE)
- HATEOS (Hyperlinks)
- Cache (HTTP Cache)
On the other side many people mean by saying SOAP a web service based on WSDL and SOAP which are part of the W3C web service architecture .
- SOAP is used as protocol to exchange information (basically method name, parameters, return values, data types, …).
- WSDL a interface definition language to describe the web service.