How Does Simple Object Access Protocol Work?
SOAP, the Simple Object Access Protocol is a messaging format designed to enable Internet applications to communicate and interoperate. SOAP was jointly created by Microsoft, IBM, DevelopMentor consulting, and UserLand software, in April, 2000. SOAP is a platform and language independent protocol that was created for Internet-based communications. While SOAP may seem complex, it really is just a format for sending messages.
-
HTTP and SOAP
-
The SOAP specification dictates that SOAP messages may be carried over HTTP, the hypertext transport protocol, either with or without the accompanying HTTP Extension Framework. In either case, use of HTTP for transfer of SOAP messages makes the process both decentralized and feature-rich. The addition of the HTTP Extension Framework adds additional layers of information during the exchange of messages. Messages passed in this manner carry additional information indicating both the presence of an incoming HTTP request, and the purpose of the exchange. SOAP's use of HTTP makes it inherently firewall friendly. HTTP is a common Internet protocol, allowed through firewalls.
XML and SOAP
-
According to Inder Nandrajog, of the New Jersey Institute of Technology's Information Systems Department, XML can be considered the basic building block of SOAP. The ultimate purpose of a SOAP message is to execute a Remote Procedure Call, or RPC, on the receiving system. SOAP messages are XML documents which contain a mandatory SOAP envelope, an optional SOAP header, and a mandatory SOAP body.
-
Message Components
-
The envelope is the topmost part of the XML document, and identifies it as a SOAP message. A message's SOAP envelope uses the namespace identifier, "http://schemas.xmlsoap.org/soap/envelope/." The SOAP header is a means of adding features to a SOAP message without prearranged negotiation. Headers attributes can dictate which party is responsible for the feature, and whether processing it is required. The SOAP body contains one mandatory item, the Fault element. This is used to report any errors in transmission or processing to the message's ultimate recipient.
Potential Benefits
-
SOAP has many potential benefits. SOAP was designed for use by anyone in the IT industry. It relies on open technologies like XML and HTTP, making it viable for even the smallest companies' development efforts. The SOAP protocol encourages platform interoperability. Different pieces of a larger SOAP based solution can be on entirely different operating systems, and still integrate seamlessly. SOAP's designers were forward thinking. While SOAP was initially created to work over HTTP, its specification does not require it. SOAP can be used over any transport protocol. Furthermore, the inherently loosely coupled nature of SOAP systems means that individual subsystems can be modified and upgraded without impacting other subsystems.
Potential Disadvantages
-
The SOAP specification is a protocol specification, not a system one. The SOAP specification dictates how messages are passed, and what they contain, but not who can see them, or when. There is no provision for message security. SOAP message data is serialized data, which is passed by value, as opposed to by reference. Because of this, there is the potential for synchronization errors. It's possible that multiple copies of the same objects could be passed simultaneously. Member systems of SOAP applications should account for this during message transfer.
-
References
Resources
- Photo Credit web puzzle image by João Freitas from Fotolia.com