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.
What is the present-day significance of SOAP*?
SOAP is a W3C standard and it's used as information exchange format in W3C web services. Those web services were - especially during the hype of SOAs (service-orientated archtitectures) around 2008 (+- 3 years) - and (unfortunately) are still implemented mostly in enterprise applications.
This has several reasons. Back then RESTful HTTP was not well-known, and it was misunderstood. Unfortunately, it's still misunderstood take a look at the other answers
„[...]REST is much more limited than SOAP[...].“
„The primary purpose of REST is to represent resources on the Internet[...].“
Additionally, SOAP (and WSDL) are a part of W3C web service protocol stack which provides even more standards for implementing a Web Service.
Are people still developing new SOAP-based APIs, or it's mostly a
So yes, there are still and there will be also in future systems out there which are using SOAP (at least in enterprise systems, mostly behind the doors). But the majority is trying to do some kind of "REST" nowadays.
Can someone please correct me if I am wrong about this difference
between SOAP and REST?
Saying REST is more flexible stateless architecture for data transfer is not a good explanation. Simply spoken REST is an architecture style with specific constraints and elements. Whereas SOAP is an information exchange protocol.
Like I already wrote you can not compare them. But you can compare a RESTful HTTP Web Service with a SOAP/WSDL Web Service.