Platinum Partner
java,enterprise-integration,soap,rest

Compare RESTful vs. SOAP Web Services

There are currently two schools of thought in developing Web Services – one being the standards-based traditional approach [ SOAP ] and the other, simpler school of thought [ REST ].

This article quickly compares one with the other -

REST
SOAP
Assumes a point-to-point communication model–not usable for distributed computing environment where message may go through one or more intermediariesDesigned to handle distributed computing environments
Minimal tooling/middleware is necessary. Only HTTP support is requiredRequires significant tooling/middleware support
URL typically references the resource being accessed/deleted/updatedThe content of the message typically decides the operation e.g. doc-literal services
Not reliable – HTTP DELETE can return OK status even if a resource is not deletedReliable
Formal description standards not in widespread use. WSDL 1.2, WADL are candidates.Well defined mechanism for describing the interface e.g. WSDL+XSD, WS-Policy
Better suited for point-to-point or where the intermediary does not play a significant roleWell suited for intermediated services
No constraints on the payloadPayload must comply with the SOAP schema
Only the most well established standards apply e.g. HTTP, SSL. No established standards for other aspects.  DELETE and PUT methods often disabled by firewalls, leads to security complexity.A large number of supporting standards for security, reliability, transactions.
Built-in error handling (faults)No error handling
Tied to the HTTP transport modelBoth SMTP and HTTP are valid application layer protocols used as Transport for SOAP
Less verboseMore verbose

Published at DZone with permission of {{ articles[0].authors[0].realName }}, DZone MVB. (source)

Opinions expressed by DZone contributors are their own.

{{ tag }}, {{tag}},

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks
Tweet

{{parent.nComments}}