SOAP vs REST: Which Web Service Protocol is Better?

SOAP vs REST: Which Web Service Protocol is Better?

Please note: This post originally appeared on Extol.com (EXTOL has been acquired by Cleo).

In this blog, the age old discussion of “Which is Better: SOAP or REST?” will be discussed, and challenges associated with your decision. We’re going to list advantages and tradeoffs of each, but first let’s start with a little background information to this architecture style.

What is a REST Web Service?

The acronym REST stands for REpresentational State Transfer, meaning each unique URL represents some object. The architecture was developed by Roy Fielding, one of the authors of the Hypertext Transfer Protocol (HTTP). A REST API uses HTTP and supports the HTTP GET, POST, PUT or DELETE methods.

What is a SOAP Web Service?

Defined as Simple Object Access Protocol, it is a specification for exchanging structured information using Extensible Markup Language (XML) and usually HTTP protocol for transmission. SOAP also uses Web Services Description Language (WSDL) documents that provide a model for describing web services. Basically, it defines what the SOAP request (client-side) and response (server-side) should look like.

The Debate

For years, people have been debating which of these public APIs is better and why. We’re going to list some pros and cons for each but the answer to the million dollar question of which is better is: it DEPENDS.

A SOAP Web service consists of an envelope, header and body all structured in XML format. A WSDL document describes the service and contains schemas for the request and response which makes consuming a SOAP web service fairly easy. Listed below is an example of the basic structure of a SOAP message.

<env:Envelope xmlns:env=”http://www.w3.org/2003/05/soap-envelope”>


<!– Header information here –>



<!– Body or “Payload” here, a Fault if error happened –>



A REST Web service does not need to contain any XML, and can be as simple as a URL. An example of getting a real time price for a stock quote would be to specify an HTTP GET to http://example.com/quote?symbol=XXX

As you can see, there are variations between both Web service types, so we comprised a partial list of pros and cons for each Web service to point out the differences.

SOAP vs REST Web Service

The point we’re trying to make is that there is no right or wrong answer to the question of which is better. If you’re a consumer then it’s likely the provider has already made the decision for you. When time is a limiting factor REST is usually the better choice but when creating a service with multiple, non-CRUD methods your best option is SOAP because each method is explicitly defined in the WSDL. REST is a better choice for simple, CRUD-oriented services, because of the way REST repurposes HTTP methods (GET, POST, PUT, and DELETE). It is also popular because it’s lightweight and has a smaller learning curve.

SOAP, on the other hand, has standards for security, addressing, etc. Your requirements will determine which type of web service you will implement unless already decided by the WS Provider. Companies such as eBay and Amazon have Web services for both REST and SOAP, and as more companies become service oriented and expose more functionality, they’ll need to support both types since there is no right answer.


Recommended for you

White paper: Why A Company, Big or Small, Might Outsource its EDI
A well-qualified EDI-as-a-service provider can produce results rapidly while avoiding common errors that can risk business operations and trading partner relationships.
eBook: What it Really Means to Do EDI
Learn about the role of modern EDI in the enterprise and discover the ways EDI can drive revenue for your organization.
B2B Integration is Broken
We've combined the best B2B integration capabilities onto a single ecosystem integration platform.
Infographic: 2021 State of Ecosystem and Application Integration
COVID exposed the costly gaps in global supply chain integrations. See the eye-opening results of our 2021 integration survey.


Sign up here to get the latest blog posts delivered directly to you.

Cleo will send you occasional emails, you may unsubscribe at any time. Cleo Privacy Policy.