Home > Articles > Programming > Windows Programming

  • Print
  • + Share This

The SOAP XML Object Model

SOAP itself doesn't deal with objects. Frankly, the object in "simple object access protocol" lends itself merely to the formation of a catchy name. Actually, SOAP as destined for RPC purposes was designed to translate a method's parameters from its native binary form and carry those parameters as XML information to the remote server. There, a corresponding SOAP processor would pull the XML information and return it to its binary state for processing. Information that would associate the method with some object (C++, Java, SmallTalk, or whatever) would be metadata to SOAP and would have to be encoded separately from the method itself.

In a sense, SOAP does have an object model, however. SOAP is XML, as defined by an XSD schema, so it really consists of XML elements. But these elements can be thought of in terms of objects, with each object having a distinct purpose. In that light, the SOAP object model consists of three main objects:

  • The SOAP Envelope

  • The SOAP Header

  • The SOAP Body

The SOAP Envelope forms the root document element of the SOAP XML packet. As such, one of its primary jobs is to convey the XML namespace information used when the packet was serialized. Of course, because the Envelope is the XML root document element, the other two SOAP objects (also XML) must be serialized within the Envelope. Thus, its other main task is to encapsulate the SOAP information for any given SOAP RPC invocation.

The SOAP Header is an optional piece of the object model that carries information necessary to process the request that isn't found in the method's signature. Here you'll commonly find public key encryption information, transactional sequence identifiers, information needed by the various actors processing the message, and other metadata that the remote SOAP processor will require to manage the remote request.

The SOAP Body is where the action takes place. Here you find the method and its parameters stored as XML. The remote SOAP processor rips through the SOAP Body and converts the XML parameter information back to a native format for processing. The bulk of this chapter targets the SOAP Body and the formatting of various method parameters and constructs.

Given this brief introduction, let's look at the objects themselves in more detail, starting with the SOAP Envelope.

  • + Share This
  • 🔖 Save To Your Account

Related Resources

There are currently no related titles. Please check back later.