Actions

Difference between revisions of "Simple Object Access Protocol (SOAP)"

Line 6: Line 6:
 
[[File:soap.png|400px|Simple Object Access Protocol (SOAP)]]<br />
 
[[File:soap.png|400px|Simple Object Access Protocol (SOAP)]]<br />
 
source: [https://msdn.microsoft.com/en-us/library/ms995800.aspx|MSDN]
 
source: [https://msdn.microsoft.com/en-us/library/ms995800.aspx|MSDN]
 +
 +
 +
SOAP was designed by Bob Atkinson, Don Box, Dave Winer, and Mohsen Al-Ghosein at Microsoft in 1998. SOAP was maintained by the XML Protocol Working Group of the World Wide Web Consortium until 2009.
 +
Message Format:
 +
*SOAP message transmits some basic information as given below
 +
*Information about message structure and instructions on processing it.
 +
*Encoding instructions for application defined data types.
 +
*Information about Remote Procedure Calls and their responses.<ref>Explaining SOAP [https://www.geeksforgeeks.org/basics-of-soap-simple-object-access-protocol/ Geeks for Geeks]</ref><br />
 +
 +
'''Points to Note About SOAP'''<ref>Points to Note About SOAP [https://www.tutorialspoint.com/soap/what_is_soap.htm TutorialsPoint]</ref><br />
 +
*SOAP is a communication protocol designed to communicate via Internet.
 +
*SOAP can extend HTTP for XML messaging.
 +
*SOAP provides data transport for Web services.
 +
*SOAP can exchange complete documents or call a remote procedure.
 +
*SOAP can be used for broadcasting a message.
 +
*SOAP is platform- and language-independent.
 +
*SOAP is the XML way of defining what information is sent and how.
 +
*SOAP enables client applications to easily connect to remote services and invoke remote methods.
 +
Although SOAP can be used in a variety of messaging systems and can be delivered via a variety of transport protocols, the initial focus of SOAP is remote procedure calls transported via HTTP.
 +
 +
Other frameworks including CORBA, DCOM, and Java RMI provide similar functionality to SOAP, but SOAP messages are written entirely in XML and are therefore uniquely platform- and language-independent.
 +
 +
 +
'''The Need for SOAP'''<ref>Why Use SOAP? [https://docs.oracle.com/cd/A97335_02/integrate.102/a90297/overview.htm Oracle]</ref><br />
 +
Why do we need a standard like SOAP? By exchanging XML documents over HTTP, two programs can exchange rich, structured information without the introduction of an additional standard such as SOAP to explicitly describe a message envelope format and a way to encode structured content.
 +
 +
SOAP provides a standard so that developers do not have to invent a custom XML message format for every service they want to make available. Given the signature of the service method to be invoked, the SOAP specification prescribes an unambiguous XML message format. Any developer familiar with the SOAP specification, working in any programming language, can formulate a correct SOAP XML request for a particular service and understand the response from the service by obtaining the following service details.
 +
*Service name
 +
*Method names implemented by the service
 +
*Method signature of each method
 +
*Address of the service implementation (expressed as a URI)
 +
Using SOAP streamlines the process for exposing an existing software component as a Web service since the method signature of the service identifies the XML document structure used for both the request and the response.
  
  

Revision as of 14:49, 25 August 2022

SOAP (Simple Object Access Protocol) is the foundational, XML-based application protocol used to implement Web services within a SOA (Service Oriented Architecture). SOAP is transported primarily via HTTP and middleware messaging systems (JMS, MQ Series, MSMQ, Tuxedo, TIBCO RV) but can also be transported via other protocols such as SMTP (Simple Mail Transfer Protocol) and FTP (File Transfer Protocol).[1]

The official definition, found in the most recent SOAP 1.2 specification, "SOAP is a lightweight protocol intended for exchanging structured information in a decentralized, distributed environment. SOAP uses XML technologies to define an extensible messaging framework, which provides a message construct that can be exchanged over a variety of underlying protocols. The framework has been designed to be independent of any particular programming model and other implementation specific semantics." This definition really gets to the heart of what SOAP. SOAP defines a way to move XML messages from point A to point B (see Figure below). It does this by providing an XML-based messaging framework that is
1) extensible,
2) usable over a variety of underlying networking protocols, and
3) independent of programming models.[2]


Simple Object Access Protocol (SOAP)
source: [2]


SOAP was designed by Bob Atkinson, Don Box, Dave Winer, and Mohsen Al-Ghosein at Microsoft in 1998. SOAP was maintained by the XML Protocol Working Group of the World Wide Web Consortium until 2009. Message Format:

  • SOAP message transmits some basic information as given below
  • Information about message structure and instructions on processing it.
  • Encoding instructions for application defined data types.
  • Information about Remote Procedure Calls and their responses.[3]

Points to Note About SOAP[4]

  • SOAP is a communication protocol designed to communicate via Internet.
  • SOAP can extend HTTP for XML messaging.
  • SOAP provides data transport for Web services.
  • SOAP can exchange complete documents or call a remote procedure.
  • SOAP can be used for broadcasting a message.
  • SOAP is platform- and language-independent.
  • SOAP is the XML way of defining what information is sent and how.
  • SOAP enables client applications to easily connect to remote services and invoke remote methods.

Although SOAP can be used in a variety of messaging systems and can be delivered via a variety of transport protocols, the initial focus of SOAP is remote procedure calls transported via HTTP.

Other frameworks including CORBA, DCOM, and Java RMI provide similar functionality to SOAP, but SOAP messages are written entirely in XML and are therefore uniquely platform- and language-independent.


The Need for SOAP[5]
Why do we need a standard like SOAP? By exchanging XML documents over HTTP, two programs can exchange rich, structured information without the introduction of an additional standard such as SOAP to explicitly describe a message envelope format and a way to encode structured content.

SOAP provides a standard so that developers do not have to invent a custom XML message format for every service they want to make available. Given the signature of the service method to be invoked, the SOAP specification prescribes an unambiguous XML message format. Any developer familiar with the SOAP specification, working in any programming language, can formulate a correct SOAP XML request for a particular service and understand the response from the service by obtaining the following service details.

  • Service name
  • Method names implemented by the service
  • Method signature of each method
  • Address of the service implementation (expressed as a URI)

Using SOAP streamlines the process for exposing an existing software component as a Web service since the method signature of the service identifies the XML document structure used for both the request and the response.


SOAP Vs. REST[6]
Both REST and SOAP offer a means of communications between web-service. REST is merely a convention implemented using the HTTP protocol and is therefore considered simpler to learn and implement.

SOAP provides the following advantages when compared to REST:

  • Language, platform, and transport independent (REST requires the use of HTTP)
  • compatible with distributed enterprise environments ( direct point-to-point communication)
  • All calls sent through POST
  • Provides significant pre-build extensibility in the form of the WS* standards
  • Built-in error handling
  • Automation when used with certain language products

REST is easier to use and is more flexible. It has the following advantages compared to SOAP:

  • Uses easy to understand standards like swagger and OpenAPI – Specification 3.0
  • Easy to learn
  • Efficient (SOAP uses XML for all messages, REST mostly uses smaller message formats like JSON) but also support XML format.
  • Fast (no extensive processing required)
  • Closer to other Web technologies in design philosophy
  • Can be stateless or stateful


See Also

Enterprise Service Bus (ESB)
Service Oriented Architecture (SOA)
Enterprise Integration
Enterprise Architecture


References

  1. What is Simple Object Access Protocol (SOAP)? F5
  2. Understanding SOAP MSDN
  3. Explaining SOAP Geeks for Geeks
  4. Points to Note About SOAP TutorialsPoint
  5. Why Use SOAP? Oracle
  6. What are the differences between SOAP and REST? [1]