Simple Object Access Protocol (SOAP)

Simple Object Access Protocol (SOAP) 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. Rational Developer products support SOAP 1.1.

SOAP is an XML-based protocol that defines three parts to every message:

 

Binding styles

SOAP supports two different communication styles:

Remote procedure call (RPC): Invocation of an operation returning a result. Typically used with SOAP encoding, which is not WS-I compliant.

Document Style: Also known as document-oriented or message-oriented style. This style provides a lower layer of abstraction, and requires more programming work if you are using the IBM SOAP or Apache Axis run-time environments.

 

Encoding styles

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:

SOAP encoding: 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 XML: 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.

 

Data model

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:

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 http://schemas.xmlsoap.org/soap/envelope/ and http://schemas.xmlsoap.org/soap/encoding/

 

SOAP implementations

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 run-time environment. This release of the Web services tools in Rational Developer Tools supports Apache SOAP 2.3, Axis 1.0, and IBM WebSphere implementations.

 

Mappings

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.

For more information on Apache SOAP, refer to xml.apache.org/soap For more information on SOAP refer to www.w3.org/TR/SOAP For more information on Web services and the WebSphere Application Server SOAP run-time, refer to the WebSphere Application Server documentation.

 

Parent topic

Web services overview

 

Related Concepts

Web services overview
Tools for Web services development

Related Tasks
Developing Web services