SOAP
SOAP is an XML based language defined
by the W3C for sending data between applications. SOAP is transport and platform
neutral.
Not all Web services use SOAP, but it is probably the most
common message format for new Web services.
SOAP Message
A SOAP message comprises an
envelope containing:
- an optional header (containing one or more header blocks)
- a mandatory body.
The content of the header and body is typically defined by WSDL.
SOAP style
SOAP defines two styles:
- RPC
- The SOAP body corresponds to a method call.
- document
- The SOAP body is typically a coarser-grained XML document and is defined
explicitly by XML schema.
SOAP encodings
SOAP also defines two encodings:
- SOAP encoding
- With SOAP encoding the content is defined using an encoding scheme which
implies a specific mapping to language-specific types.
- literal
- With literal encoding the SOAP content is defined explicitly by some schema
(generally XML Schema).
SOAP style and encoding combinations
The
above allows for four possible SOAP style and encoding combinations, but only
the following three are meaningful and supported by the WSDL importer and
generator:
- document - literal
- RPC - literal
- RPC - encoded (supported for WSDL importer only)
SOAP Versions
Two versions of SOAP are currently
encountered: 1.1 and 1.2. SOAP 1.1 is perhaps more common, but has some interoperability
issues (mainly concerned with the use of SOAP encoding) which are addressed
by a separate standard: the WS-I Basic Profile.