Home > Articles > Web Services > XML

What are the values in a SOAP payload?

There are two kinds of values in a SOAP payload. The first kind is called a single-reference value and can only be referenced by one accessor. Consider the following XML fragment

<Car>Corvette</Car>

<Automobile>
Corvette
</Automobile>

In this case, both the <Car> element and the <Automobile> element contain their own unique Corvette values. This means that each Corvette value has only been referenced by its surrounding element (that is, accessor) and no other.

The second kind of value in a SOAP payload is called a multi-reference value and can be referenced by one or more accessors. Let's examine a similar XML fragment that uses multi-reference values:

<Car href="#somecar" />

<Automobile id="somecar">
Corvette
</Automobile>

In this example, Corvette is referenced by two accessors, the Car accessor and the Automobile accessor; thus, it is considered a multi-reference value.

The purpose for distinguishing between single-reference and multi-reference values helps to deal with identity issues of serializing (that is, marshaling) data across the wire. For instance, if two method parameters reference the same value, in some cases you will want the XML to reflect this identity and in other cases you won't.

Source: This FAQ is excerpted from Understanding SOAP by Kennard Scribner and Mark C. Stiver (2000, Sams, ISBN 0672319225). Refer to this book for more detailed information on SOAP.

  • + Share This
  • 🔖 Save To Your Account

Related Resources

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