SOAP Explanation

Simple Object Access Protocol

Short for Simple Object Access Protocol according to, SOAP is a standard protocol that defines how two objects in different processes can communicate by exchanging XML data. This protocol derives from a protocol created by David Winerenen 1998, called XML-RPC. SOAP was created by Microsoft, IBM, and others and is currently under the auspices of the W3C. It is one of the protocols used in Web Services.

SOAP overriding goals

  • Establish a standard protocol for the invocation of remote services, based on standard Internet protocols: HTTP (Hypertext Transport Protocol) for transmission and XML (Extensible Markup Language) for data encoding.
  • Platform independence, development language and implementation (object model).

The HTTP communication protocol is the one used intrinsically for the connection over the Internet. It ensures that any client with a standard browser can connect to a remote server. Data transmission is packed with XML, which has become the standard for data exchange, saving incompatibilities between other protocols, such as RDR (Network Data Representation) or RDC (Common Data Representation).

On the other hand, Web Servers can process user requests, using Servlet technologies, ASP (Active Server Pages) or JSP (Java Server Pages), or an application server, invoking objects of CORBA, COM or EJB types..

As SOAP circumscribes additional information included in the XML document, the description of said document will be presented below.

Some advantages of SOAP

  • It is not associated with any language: developers involved in new projects can choose to develop with the latest and greatest programming language out there, but developers responsible for maintaining old legacy woes may not be able to make this choice about the programming language they use. SOAP does not specify an API, so the implementation of the API is left to the programming language, as in Java, and the platform as NET.
  • It is not strongly associated with any transport protocol: The SOAP specification does not describe how SOAP messages should be associated with HTTP. A SOAP message is nothing more than an XML document, so it can be transported using any protocol capable of transmitting text.
  • Not tied to any distributed object infrastructure Most distributed object systems can be extended, and some of them already are to support SOAP.
  • Leverage Existing Industry Standards: Major contributors to the SOAP specification intentionally avoided reinventing things. They chose to extend the existing standards to match their needs. For example, SOAP takes advantage of XML for encoding messages, instead of using its own type systems that are already defined in the XML schema specification. And as already mentioned SOAP does not define a means of transporting the messages; SOAP messages can be associated with existing transport protocols such as HTTP and SMTP.
  • It allows interoperability between multiple environments: SOAP was developed on the existing industry standards, so that applications that run on platforms with said standards can communicate via SOAP message with applications that run on other platforms. For example, a desktop application running on a PC can communicate with a back-end application running on a mainframe capable of sending and receiving XML over HTTP.

How SOAP works

Below is a diagram of how SOAP works

The SOAP specification mentions that applications must be independent of the development language, so client and server applications can be written with HTML, DHTML, Java, Visual Basic, or other available tools and languages. The important thing is to have some SOAP implementation (depending on the chosen development tool) and link its libraries with the application. Although this is not strictly necessary, it is preferable to work using these libraries, in order not to rewrite an already tested code.
Requests using the HTTP protocol use the POST command to transmit information between the client and the server.
On the other hand, the term Object in the name means that it adheres to the paradigm of object-oriented programming.
SOAP is an extensible and decentralized framework that allows you to work on multiple stacks of computer network protocols. Remote call procedures can be modeled in the form of several SOAP messages interacting with each other.
These messages consist of 3 sections: envelope, header and body.
• envelope: It is the root element of the message to describe its content and how to process it.
• header: It is the identification information of the content. A group of encoding rules to express the instances of application-defined data types.
• body: It is the content of the message. A convention for representing calls and responses to remote procedures.

Message exchange model

  • SOAP messages are one-way transmissions from a sender to a receiver.
    • Messages are often combined to implement patterns, such as request / response.
    • SOAP implementations can be optimized to exploit the specific characteristics of particular network systems.

Message processing

A SOAP application must process a message following an order of actions:
1. Identify the parts of the SOAP message addressed to that application.
2. Accept the mandatory parts identified in step 1 and process them appropriately. Otherwise, discard the message.
3. If the SOAP application is not the final destination of the message, remove all parts identified in step 1 before forwarding the message.
It should also be noted that this protocol is extensible.

Simple Object Access Protocol