Tech 

Difference between SOAP and REST




Simple Object Access Protocol (SOAP)
The Simple Object Access Protocol is a lightweight XML-based protocol used to exchange information over the Internet between programs running on the same or different operating systems. SOAP messages can be transported using various protocols, including HTTP, SMTP, or MIME. All SOAP messages use the same format, making them compatible with multiple operating systems and protocols.

Why use the HTTP protocol for SOAP messages?
Traditionally, the HTTP protocol is used to send web pages over the Internet. Because firewalls do not normally block port 80 (HTTP) traffic, most SOAP messages can pass through without issue.

State Representational Transfer (REST)
REST is a stateless architecture based on web standards and generally runs on HTTP. It was first described by Roy Fielding in 2000. The architecture treats each entity as a resource that can be accessed through a common interface based on standard HTTP methods.

REST architecture
REST architecture typically has a REST client and a server. The server normally provides access to resources and a client accesses and modifies the resources. Resources are identified using global IDs (usually these are Universal Resource Indicators (URIs)). The architecture focuses on a limited set of operations between the client and a server to improve the efficiency of a system.

Difference between SOAP and REST web services

  1. SOAP is an XML-based messaging protocol while REST is an architectural style.
  2. SOAP is designed for distributed data processing, while REST assumes point-to-point communication in which the intermediary does not play a significant role.
  3. REST requires nothing but HTTP. SOAP requires a complete set of tools and middleware support.
  4. An error handler is built into REST. There is no such handler in SOAP.

Related posts

Leave a Comment