Recommended: Sing it, brah! 5 fabulous songs for developers
JW's Top 5
Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs
Read the whole "XML Messaging" series:
SOAP is an XML messaging/RPC (Remote Procedure Call) standard to enable the exchange of a variety of information. As one benefit, it provides a framework for XML messaging without excessive complexity. The SOAP specification is fairly concise compared with many other messaging standards, with much of the text dedicated to encoding. Because of its widespread industry support, simple design, and the use of SOAP in other XML standards, SOAP appears to be the XML messaging standard to watch.
In this article, the second of three, I'll begin by describing SOAP's fundamentals and capabilities. Next, I'll introduce the standards that use SOAP in some fashion, including UDDI (Universal Description, Discovery, and Integration), Web services, and BizTalk. I'll then briefly discuss the future of SOAP, wrapping up by developing the same simple messaging application covered in Part 1.
SOAP comprises three major components: a messaging framework, an encoding standard, and an RPC mechanism. When using SOAP, you can choose to use just the messaging framework, the messaging framework with the encoding standard, or all three together. Let's look at each in more detail.
SOAP's messaging framework says that SOAP messages will be composed of an outer envelope that can contain a header and a body. The following is a skeleton example of a SOAP message with no information in it. Make note of the outer most element called the SOAP envelope, as everything in a SOAP message falls inside it. The other two important tags are the SOAP header and the SOAP body. The header portion of the message carries meta data about the message, while the body contains the message's payload:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
<SOAP-ENV:Header>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
In SOAP, you'll notice the heavy use of XML namespaces. For instance, the SOAP-ENV namespace in the example above denotes elements related to the SOAP envelope, header, and body. A SOAP document, consequently,
can prove slightly more difficult to read than other XML documents, necessary for the flexibility SOAP requires to be extensible.
Header elements in a SOAP document can be labeled as mustUnderstand, meaning that the server that processes the SOAP message must understand that type of header element or it must reject the
message.
Messages are rejected by generating SOAP faults. Faults happen when an error occurs when processing a message. Errors can have many causes, but the most likely culprits include an unrecognizable header field, a message that cannot be authenticated, or errors that occur when invoking a method to process the message.