SOAP (formerly known as Simple Object Access Protocol) is a lightweight
protocol for the exchange of information in a decentralized, distributed environment.
A SOAP message is a transmission of information from a sender to a receiver.
SOAP messages can be combined to perform request/response patterns.
SOAP is transport independent but is most commonly carried over HTTP in
order to run with the existing Internet infrastructure. SOAP enables
the binding and usage of discovered Web services by defining a message path
for routing messages. SOAP is used to query UDDI for Web services. The workbench
supports SOAP 1.1.
SOAP is an XML-based protocol that defines three parts to every message:
- Envelope. The envelope defines a framework
for describing what is in a message and how to process it. A SOAP message
is an envelope containing zero or more headers and exactly one body.
The envelope is the top element of the XML document, providing a container
for control information, the address of a message, and the message itself.
Headers transport any control information such as quality-of-service attributes.
The body contains the message identification and its parameters. Both
the headers and the body are child elements of the envelope.
- Encoding rules. The set of encoding rules
expresses instances of application-defined data types. Encoding rules define
a serialization mechanism that can be used to exchange instances of application-defined
data types. SOAP defines a programming language-independent data type scheme
based on XSD plus encoding rules for all data types defined according to this
model. SOAP encoding is not WS-I compliant and thus the Literal use (which
is no encoding) is suggested for interoperable Web services and required for
- Communication styles. Communications can follow
a remote procedure call (RPC) or message-oriented (Document) format.
These are discussed below.
SOAP supports two different communication
Remote procedure call (RPC):
Invocation of an operation returning a result. Typically used with SOAP encoding,
which is not WS-I compliant.
Also known as document-oriented or message-oriented style. This style
provides a lower layer of abstraction, and requires more programming work.
In distributed computing environments,
encoding styles define how data values defined in the application can be translated
to and from a particular protocol format. The translation process is
know as serialization and deserialization.
The SOAP specification defines
the SOAP encoding style:
The SOAP encoding style allows you to serialize/deserialize values of data
types from the SOAP data model. This encoding style is defined in the
SOAP 1.1 standard, and is not WS-I compliant.
WSDL defines the
Literal XML encoding style:
Literal refers to the fact that the document should be read as-is, or unencoded.
The document is serialized as XMI, meaning that the message XML complies with
the Schema in the WSDL. When using Literal encoding, each message part references
a concrete schema definition. Literal encoding is WS-I compliant.
The purpose of the SOAP data model is
to provide a language-independent abstraction for data types used by common
programming language types. It consists of:
- Simple XSD types. For example int, string,
- Compound types. There are two kinds of compound
types, structs and arrays. Structs
are named aggregate types in which each element has a unique name or XML tag.
Arrays have elements that are identified by position, not by name.
All elements and identifiers comprising the SOAP data model are defined
in the namespace URI. The SOAP standard defines the rules for how data
types can be constructed. A project specific XML schema must define the actual
data types. The elements of the SOAP specification are defined in
Different implementations of
the SOAP protocol are available today. For example, the Apache Foundation
provides Apache SOAP, which grew out of an IBM® project called SOAP4J, as well as Apache
Axis and the IBM WebSphere® runtime
A mapping defines an association between
a qualified XML element name, a Java™ class name, and an encoding style.
The mapping specifies how, under the given encoding, an incoming XML element
with a fully qualified name is converted to a Java class and vice versa.
information on Apache SOAP, refer to
xml.apache.org/soap For more information on
SOAP refer to