SOAP Version 1.2 Part 2 - Adjuncts
SOAP Version 1.2 Part 2 - Adjuncts
Table of Contents
1. Introduction
1.1 Notational Conventions
2. SOAP Data Model
2.1 Graph Edges
2.1.1 Edge labels
2.2 Graph Nodes
2.2.1 Single and Multi Reference Nodes
2.3 Values
3. SOAP Encoding
3.1 Mapping between XML and the SOAP Data Model
3.1.1 Encoding Graph Edges and Nodes
3.1.2 Encoding Simple Values
3.1.3 Encoding Compound Values
3.1.4 Computing the Type Name Property
3.1.4.1 itemType Attribute Information Item
3.1.5 Unique identifiers
3.1.5.1 id Attribute Information Item
3.1.5.2 ref Attribute Information Item
3.1.5.3 Constraints on id and ref Attribute Information Items
3.1.6 arraySize Attribute Information Item
3.1.7 nodeType Attribute Information Item
3.2 Decoding Faults
4. SOAP RPC Representation
4.1 Use of RPC on the World Wide Web
4.1.1 Identification of RPC Resources
4.1.2 Distinguishing Resource Retrievals from other RPCs
4.2 RPC and SOAP Body
4.2.1 RPC Invocation
4.2.2 RPC Response
4.2.3 SOAP Encoding Restriction
4.3 RPC and SOAP Header
4.4 RPC Faults
5. A Convention for Describing Features and Bindings
5.1 Model and Properties
5.1.1 Properties
5.1.2 Property Scope
5.1.2.1 Message Exchange Context
5.1.2.2 Environment Context
5.1.3 Properties and Features
6. SOAP-Supplied Message Exchange Patterns and Features
6.1 Property Conventions for SOAP Message Exchange Patterns
6.2 SOAP Request-Response Message Exchange Pattern
6.2.1 SOAP Feature Name
6.2.2 Description
6.2.3 State Machine Description
6.2.4 Fault Handling
6.3 SOAP Response Message Exchange Pattern
6.3.1 SOAP Feature Name
6.3.2 Description
6.3.3 State Machine Description
6.3.4 Fault Handling
6.4 SOAP Web Method Feature
6.4.1 SOAP Feature Name
6.4.2 Description
6.4.3 SOAP Web Method Feature State Machine
6.5 SOAP Action Feature
6.5.1 SOAP Feature Name
6.5.2 Description
6.5.3 SOAP Action Feature State Machine
7. SOAP HTTP Binding
7.1 Introduction
7.1.1 Optionality
7.1.2 Use of HTTP
7.1.3 Interoperability with non-SOAP HTTP Implementations
7.1.4 HTTP Media-Type
7.2 Binding Name
7.3 Supported Message Exchange Patterns
7.4 Supported Features
7.5 MEP Operation
7.5.1 Behavior of Requesting SOAP Node
7.5.1.1 Init
7.5.1.2 Requesting
7.5.1.3 Sending+Receiving
7.5.1.4 Receiving
7.5.1.5 Success and Fail
7.5.2 Behavior of Responding SOAP Node
7.5.2.1 Init
7.5.2.2 Receiving
7.5.2.3 Receiving+Sending
7.5.2.4 Sending
7.5.2.5 Success and Fail
7.6 Security Considerations
8. References
8.1 Normative References
8.2 Informative References
Appendices
A. The application/soap+xml Media Type
B. Mapping Application-Defined Names to XML Names
B.1 Rules for Mapping Application-Defined Names to XML Names
B.2 Examples
C. Using W3C XML Schema with SOAP Encoding (Non-Normative)
C.1 Validating Using the Minimum Schema
C.2 Validating Using the SOAP Encoding Schema
C.3 Validating Using More Specific Schemas
D. Acknowledgements (Non-Normative)
1. Introduction
SOAP Version 1.2 (SOAP) is a lightweight protocol intended for exchange of structured
information in a decentralized, distributed environment. The SOAP specification
consists of three parts. Part 2 (this document) defines a set of adjuncts that MAY be
used with the SOAP messaging framework:
1. The SOAP Data Model represents application-defined data structures and values
as a directed, edge-labeled graph of nodes (see 2. SOAP Data Model).
2. The SOAP Encoding defines a set of rules for encoding instances of data that
conform to the SOAP Data Model for inclusion in SOAP messages (see 3. SOAP
Encoding).
3. The SOAP RPC Representation defines a convention for how to use the SOAP
Data Model for representing RPC calls and responses (see 4. SOAP RPC
Representation).
4. The section for describing features and bindings defines a convention for
describing features and binding in terms of properties and property values (see 5.
A Convention for Describing Features and Bindings).
5. The section on SOAP-Supplied Message Exchange Patterns and Features
defines a request response message exchange pattern and a message
exchange pattern supporting non-SOAP requests for SOAP responses, (see 6.
SOAP-Supplied Message Exchange Patterns and Features).
6. The SOAP Web Method feature defines a feature for control of methods used on
the World Wide Web (see 6.4 SOAP Web Method Feature).
7. The SOAP HTTP Binding defines a binding of SOAP to HTTP (see [RFC 2616])
following the rules of the SOAP Protocol Binding Framework, [SOAP Part 1] (see 7.
SOAP HTTP Binding).
SOAP 1.2 Part 1 [SOAP Part 1] defines the SOAP messaging framework.
Note:
In previous versions of this specification the SOAP name was an acronym. This is no
longer the case.
This specification uses a number of namespace prefixes throughout; they are listed in
Table 1. Note that the choice of any namespace prefix is arbitrary and not semantically
significant (see XML Infoset [XML InfoSet]).
This specification uses the Extended Backus-Naur Form (EBNF) as described in XML
1.0 [XML 1.0].
With the exception of examples and sections explicitly marked as "Non-Normative", all
parts of this specification are normative.
An edge label is an XML qualified name. Two edge labels are equal if and only if their
XML expanded names are equal. I.e., both of the following are true:
See 2.3 Values for uses of edge labels and position to distinguish the members of
encoded values, and XML Schema [XML Schema Part 2] for more information about
comparing XML qualified names.
2.3 Values
A simple value is represented as a graph node with a lexical value.
A compound value is represented as a graph node with zero or more outbound edges
as follows:
1. A graph node whose outbound edges are distinguished solely by their labels is
known as a "struct". The outbound edges of a struct MUST be labeled with
distinct names (see 2.1.1 Edge labels).
2. A graph node whose outbound edges are distinguished solely by position is
known as an "array". The outbound edges of an array MUST NOT be labeled.
3. SOAP Encoding
SOAP Encoding provides a means of encoding instances of data that conform to the
data model described in 2. SOAP Data Model. This encoding MAY be used to transmit
data in SOAP header blocks and/or SOAP bodies. Other data models, alternate
encodings of the SOAP Data Model as well as unencoded data MAY also be used in
SOAP messages (see SOAP 1.2 Part 1 [SOAP Part 1], SOAP encodingStyle Attribute for
specification of alternative encoding styles and see 4. SOAP RPC Representation for
restrictions on data models and encodings used to represent SOAP Remote Procedure
Calls (RPC)).
The serialization rules defined in this section are identified by the URI
"http://www.w3.org/2003/05/soap-encoding". SOAP messages using this particular
serialization SHOULD indicate that fact by using the SOAP encodingStyle attribute
information item (see SOAP 1.2 Part 1 [SOAP Part 1] SOAP encodingStyle Attribute).
The encodings are described below from the perspective of a de-serializer. In each
case, the presence of an XML serialization is presumed, and the mapping to a
corresponding graph is described.
More than one encoding is typically possible for a given graph. When serializing a graph
for transmission inside a SOAP message, a representation that deserializes to the
identical graph MUST be used; when multiple such representations are possible, any of
them MAY be used. When receiving an encoded SOAP message, all representations
MUST be accepted.
Each graph edge is encoded as an element information item and each element
information item represents a graph edge. 3.1.3 Encoding Compound Values describes
the relationship between edge labels and the [local name] and [namespace name]
properties of such element information items.
1. If the element information item representing the edge does not have a ref
attribute information item (see 3.1.5.2 ref Attribute Information Item) among its
attributes then that element information item is said to represent a node in the
graph and the edge terminates at that node. In such cases the element
information item represents both a graph edge and a graph node
2. If the element information item representing the edge does have a ref attribute
information item (see 3.1.5.2 ref Attribute Information Item) among its attributes,
then the value of that attribute information item MUST be identical to the value of
exactly one id attribute information item ( see 3.1.5.1 id Attribute Information
Item) in the same envelope. In this case the edge terminates at the graph node
represented by the element information item on which the id attribute information
item appears. That element information item MUST be in the scope of an
encodingStyle attribute with a value of "http://www.w3.org/2003/05/soap-
encoding" (see SOAP 1.2 Part 1 [SOAP Part 1], SOAP encodingStyle Attribute).
All nodes in the graph are encoded as described in 1 above. Additional inbound edges
for multi reference graph nodes are encoded as described in 2 above.
The lexical value of a graph node representing a simple value is the sequence of
Unicode characters identified by the character information item children of the element
information item representing that node. The element information item representing a
simple value node MAY have among its attributes a 'nodeType' attribute information
item (see 3.1.7 nodeType Attribute Information Item). Note that certain Unicode
characters cannot be represented in XML (see XML 1.0 [XML 1.0]).
1. For a graph edge which is distinguished by label, the [local name] and
[namespace name] properties of the child element information item together
determine the value of the edge label.
2. For a graph edge which is distinguished by position:
o The ordinal position of the graph edge corresponds to the position of the
child element information item relative to its siblings
o The [local name] and [namespace name] properties of the child element
information item are not significant.
3. The element information item representing a compound value node MAY have
among its attributes a nodeType attribute information item (see 3.1.7 nodeType
Attribute Information Item).
4. The following rules apply to the encoding of a graph node that represents an
"array":
o The element information item representing an array node MAY have
among its attributes an itemType attribute information item (see 3.1.4.1
itemType Attribute Information Item).
o The element information item representing an array node MAY have
among its attributes an arraySize attribute information item (see 3.1.6
arraySize Attribute Information Item).
5. If a graph edge does not terminate in a graph node then it can either be omitted
from the serialization or it can be encoded as an element information item with an
xsi:nil attribute information item whose value is "true".
The type name property of a graph node is a {namespace name, local name} pair
computed as follows:
1. If the element information item representing the graph node has an xsi:type
attribute information item among its attributes then the type name property of the
graph node is the value of the xsi:type attribute information item.
Note:
This attribute is of type xs:QName (see XML Schema [XML Schema Part 2]);
its value consists of the pair {namespace name, local name}. Neither the
prefix used to construct the QName nor any information relating to any
definition of the type is considered to be part of the value. The SOAP graph
carries only the qualified name of the type.
2. Otherwise if the parent element information item of the element information item
representing the graph node has an enc:itemType attribute information item (see
3.1.4.1 itemType Attribute Information Item) among its attributes then the type
name property of the graph node is the value of the enc:itemType attribute
information item
3. Otherwise the value of the type name property of the graph node is unspecified.
Note:
These rules define how the type name property of a graph node in a graph is computed
from a serialized encoding. This specification does not mandate validation using any
particular schema language or type system. Nor does it include built in types or provide
any standardized faults to reflect value/type name conflicts.
The itemType attribute information item has the following Infoset properties:
The type of the itemType attribute information item is xs:QName. The value of the
itemType attribute information item is used to compute the type name property (see
3.1.4 Computing the Type Name Property) of members of an array.
A [local name] of id .
A [namespace name] of "http://www.w3.org/2003/05/soap-encoding".
A [specified] property with a value of "true".
The type of the id attribute information item is xs:ID. The value of the id attribute
information item is a unique identifier that can be referred to by a ref attribute
information item (see 3.1.5.2 ref Attribute Information Item).
The ref attribute information item has the following Infoset properties:
The type of the ref attribute information item is xs:IDREF. The value of the ref attribute
information item is a reference to a unique identifier defined by an id attribute
information item (see 3.1.5.1 id Attribute Information Item).
The value of a ref attribute information item MUST also be the value of exactly one id
attribute information item.
A ref attribute information item and an id attribute information item MUST NOT appear
on the same element information item.
The arraySize attribute information item has the following Infoset properties:
The type of the arraySize attribute information item is enc:arraySize. The value of the
arraySize attribute information item MUST conform to the following EBNF grammar
The nodeType attribute information item has the following Infoset properties:
The value of the nodeType attribute information item MUST, if present, be one of the
strings "simple" or "struct" or "array". The value indicates what kind of a value this node
represents - a simple value, a compound struct value or a compound array value
respectively.
As mentioned in section 2. SOAP Data Model, use and implementation of the SOAP
RPC Representation is OPTIONAL.
The SOAP encodingStyle attribute information item (see SOAP 1.2 Part 1 [SOAP Part 1]
SOAP encodingStyle Attribute) is used to indicate the encoding style of the RPC
representation. The encoding thus specified MUST support the 2. SOAP Data Model.
The encoding style defined in 3. SOAP Encoding supports such constructs and is
therefore suitable for use with the SOAP RPC Representation.
This SOAP RPC Representation is not predicated on any SOAP protocol binding. When
SOAP is bound to HTTP, an RPC invocation maps naturally to an HTTP request and an
RPC response maps to an HTTP response. (see 7. SOAP HTTP Binding). However, the
SOAP RPC Representation is not limited to the SOAP HTTP Binding.
SOAP RPC relies on the protocol binding to provide a mechanism for carrying the URI
of the target SOAP node. For HTTP the request URI indicates the resource against
which the invocation is being made. Other than requiring it to be a valid URI, SOAP
places no restriction on the form of an identifier (see RFC 3986 [RFC 3986] for more
information on URIs). The section 4.1.1 Identification of RPC Resources further
discusses the use of URIs for identifying RPC resources.
The SOAP RPC Representation employs the 6.2 SOAP Request-Response Message
Exchange Pattern and 6.3 SOAP Response Message Exchange Pattern. Use of the SOAP
RPC Representation with other MEPs MAY be possible, but is beyond the scope of this
specification.
The World Wide Web identifies resources with URIs, but common programming
conventions convey identification information in the arguments to procedures, or in the
names of those procedures. For example, the call:
updateQuantityInStock(PartNumber="123", NewQuantity="200")
suggests that the resource to be updated is the QuantityInStock for PartNumber "123".
Accordingly, when mapping to or from a programming language method or procedure,
any arguments that serve to identify resources (such as the part number above) should
when practical be represented in the URI to which the SOAP message is addressed.
When mapping to or from a programming language method or procedure, the name of
which identifies or qualifies the identification of a resource (such as QuantityInStock
above), such naming or qualification should when practical be represented in the URI to
which the SOAP message is addressed. No standard means of representation of
arguments or method names is provided by this specification.
Note:
Conventions for specific URI encodings of procedure names and arguments, as well as
for controlling the inclusion of such arguments in the SOAP RPC body could be
established in conjunction with the development of Web Service interface description
languages. They could be developed when SOAP is bound to particular programming
languages or could be established on an application- or procedure-specific basis.
The World Wide Web depends on mechanisms that optimize commonly performed
information retrieval tasks. Specifically, protocols such as HTTP [RFC 2616] provide a
GET method which is used to perform safe retrievals, i.e., to perform retrievals that are
idempotent, free of side effects, and for which security considerations do not preclude
the use of cached results or URI-based resource identification.
Certain procedure or method calls represent requests for information retrieval. For
example, the call:
getQuantityInStock(PartNumber="123")
might be used to retrieve the quantity established in the example above.
The following conventions can be employed to implement SOAP retrievals and other
RPCs on the Web:
The SOAP RPC Representation does not define any other value for the
http://www.w3.org/2003/05/soap/features/web-method/Method .
If the return value of the procedure is void then an outbound edge with a local
name of result and a namespace name of "http://www.w3.org/2003/05/soap-
rpc" MUST NOT be present.
Invocation faults are handled according to the rules in 4.4 RPC Faults. If a
protocol binding adds additional rules for fault expression, those MUST also be
followed.
When using SOAP encoding (see 3. SOAP Encoding) in conjunction with the RPC
convention described here, the SOAP Body MUST contain only a single child element
information item, that child being the serialized RPC invocation or response struct.
Errors arising during RPC invocations are reported according to the following rules:
Note:
Throughout this document, the term "Value of Code " is used as a shorthand
for "value of the Value child element information item of the Code element
information item" (see SOAP 1.2 Part 1 [SOAP Part 1], SOAP Code Element ).
Note:
4. A fault with a Value of Code set to "env:Sender" and a Value of Subcode set to
"rpc:BadArguments" MUST be generated when the receiver cannot parse the
arguments or when there is a mismatch in number and/or type of the arguments
between what the receiver expects and what was sent.
5. Other faults arising in an extension or from the application SHOULD be
generated as described in SOAP 1.2 Part 1 [SOAP Part 1] SOAP Fault Codes.
In all cases the values of the Detail and Reason element information items are
implementation-defined. Details of their use MAY be specified by an external document.
Note:
Senders might receive different faults from those listed above in response to an RPC
invocation if the receiver does not support the (optional) RPC convention described
here.
5. A Convention for Describing Features and Bindings
This section describes a convention describing Features (including MEPs) and Bindings
in terms of properties and property values. The convention is sufficient to describe the
distributed states of Feature and Binding specifications as mandated by the Binding
Framework (see SOAP 1.2 Part 1 [SOAP Part 1] SOAP Protocol Binding Framework) and it
is used to describe a Request-Response MEP (see 6.2 SOAP Request-Response
Message Exchange Pattern), a Response MEP (see 6.3 SOAP Response Message
Exchange Pattern), the SOAP Web Method feature (see 6.4 SOAP Web Method Feature)
and the SOAP HTTP Binding (see 7. SOAP HTTP Binding) elsewhere in this document.
Along with the convention itself, an informal model is defined that describes how
properties propagate through a SOAP system. Note that this model is intended to be
illustrative only, and is not meant to imply any constraints on the structure or layering of
any particular SOAP implementation.
5.1.1 Properties
Properties within a SOAP node differ in terms of their scope and the origins of their
values. As shown in the figure below, we make the distinction between per-message-
exchange properties and more widely scoped properties by assigning them to different
containers called Message Exchange Context and Environment Context respectively.
All properties, regardless of their scope, are shared by a SOAP node and a particular
Binding.
Figure 1: Model describing properties shared between SOAP and Binding
A feature may be expressed through multiple properties and a single property may
enable more than one feature. For example, the properties called User ID and
Password may be used to enable a feature called Authentication. As a second example,
a single property called Message ID could be used to enable one feature called
Transaction and a second feature called Message Correlation.
Property name:
http://www.w3.org/2003/05/soap/bindingFramework/ExchangeContext/Fai
lureReason
Value: A value that denotes a pattern-specific, binding-independent reason
for the failure of a message exchange. Underlying protocol binding
specifications may define properties to convey more binding-specific details
of the failure.
Type: xs:anyURI
Property name:
http://www.w3.org/2003/05/soap/bindingFramework/ExchangeContext/Rol
e
Value:The identifier of the pattern-specific role of the local SOAP node
participating in the message exchange.
Type: xs:anyURI
Property name:
http://www.w3.org/2003/05/soap/bindingFramework/ExchangeContext/Sta
te
Value: The identifier of the current state of the message exchange. This
value is managed by the binding instance and may be inspected by other
entities monitoring the progress of the message exchange.
Type: xs:anyURI
This message exchange pattern is identified by the URI (see SOAP 1.2 Part 1 [SOAP
Part 1] SOAP Features):
"http://www.w3.org/2003/05/soap/mep/request-response/"
6.2.2 Description
The SOAP Request-Response MEP defines a pattern for the exchange of a SOAP
message acting as a request followed by a message acting as a response. The
response message MAY contain a SOAP envelope, or else the response MUST be a
binding-specific message indicating that the request has been received. In the absence
of failure in the underlying protocol, this MEP consists of exactly two messages.
Property name:
http://www.w3.org/2003/05/soap/mep/ImmediateDestination
Value: The identifier of the immediate destination of an outbound message.
Type: xs:anyURI
Property name: http://www.w3.org/2003/05/soap/mep/ImmediateSender
Value: The identifier of the immediate sender of an inbound message.
Type: xs:anyURI
Property name:
http://www.w3.org/2003/05/soap/bindingFramework/ExchangeContext/Fai
lureReason
Value: "None"
Notes: A relative URI whose base URI is the value of the property named
http://www.w3.org/2002/12/soap/bindingFramework/ExchangeContext/Exc
hangePatternName
Property name:
http://www.w3.org/2003/05/soap/bindingFramework/ExchangeContext/Rol
e
Value: "RequestingSOAPNode"
Notes: A relative URI whose base URI is the value of the property named
http://www.w3.org/2002/12/soap/bindingFramework/ExchangeContext/Exc
hangePatternName
Property name:
http://www.w3.org/2003/05/soap/bindingFramework/ExchangeContext/Sta
te
Value: "Init"
Notes: A relative URI whose base URI is the value of the property named
http://www.w3.org/2002/12/soap/bindingFramework/ExchangeContext/Rol
e
Property name:
http://www.w3.org/2003/05/soap/mep/ImmediateDestination
Value: An identifier (URI) that denotes the responding SOAP node
There may be other properties related to the operation of the message exchange
context instance. Such properties are initialized according to their own feature
specifications.
Once the message exchange context is initialized, control of the context is passed to a
(conforming) local binding instance.
The diagram below shows the logical state transitions at the requesting and responding
SOAP nodes during the lifetime of the message exchange. At each SOAP node, the
local binding instance updates (logically) the value of the
http://www.w3.org/2003/05/soap/bindingFramework/ ExchangeContext/State property
to reflect the current state of the message exchange. The state names are relative
URIs, relative to a base URI value carried in the
http://www.w3.org/2003/05/soap/bindingFramework/ ExchangeContext/Role property
of the local message exchange context.
Figure 2: Request-Response MEP State Transition Diagram.
When the local binding instance at the responding SOAP node starts to receive an
inbound request message, it (logically) instantiates a message exchange context. Table
5 describes the properties that the binding initializes as part of the context's instantiation.
Table 5: Instantiation of Message Exchange Context for an inbound request message at a responding
SOAP node
Property name:
http://www.w3.org/2003/05/soap/bindingFramework/ExchangeContext/ExchangePatte
rnName
Value: "http://www.w3.org/2003/05/soap/mep/request-response/"
Notes: Initialized as early as possible during the life cycle of the message exchange.
Property name:
http://www.w3.org/2003/05/soap/bindingFramework/ExchangeContext/Fai
lureReason
Value: "None"
Notes: A relative URI whose base URI is the value of the property named
http://www.w3.org/2002/12/soap/bindingFramework/ExchangeContext/Exc
hangePatternName
Property name:
http://www.w3.org/2003/05/soap/bindingFramework/ExchangeContext/Rol
e
Value: "RespondingSOAPNode"
Notes: A relative URI whose base URI is the value of the property named
http://www.w3.org/2002/12/soap/bindingFramework/ExchangeContext/Exc
hangePatternName . Initialized as early as possible during the life cycle the
message exchange.
Property name:
http://www.w3.org/2003/05/soap/bindingFramework/ExchangeContext/Sta
te
Value: "Init"
Notes: A relative URI whose base URI is the value of the property named
http://www.w3.org/2002/12/soap/bindingFramework/ExchangeContext/Rol
e
When the requesting and responding SOAP nodes transition between states, the local
binding instance (logically) updates a number of properties. Table 6 and Table 7 describe
these updates for the requesting and the responding SOAP nodes, respectively.
CurrentState
CurrentState
Bindings that implement this MEP MAY provide for streaming of SOAP responses. That
is, responding SOAP nodes MAY begin transmission of a SOAP response while a
SOAP request is still being received and processed. When SOAP nodes implement
bindings that support streaming, the following rules apply:
All the rules in SOAP 1.2 Part 1 [SOAP Part 1] Binding Framework regarding
streaming of individual SOAP messages MUST be obeyed for both request and
response SOAP messages.
When using streaming SOAP bindings, requesting SOAP nodes MUST avoid
deadlock by accepting and if necessary processing SOAP response information
while the SOAP request is being transmitted.
Note:
During the operation of the Request-Response MEP, the participating SOAP nodes may
generate SOAP faults.
If a SOAP fault is generated by the responding SOAP node while it is in the "Receiving"
state, the SOAP fault is made available in
http://www.w3.org/2003/05/soap/mep/OutboundMessage and the state machine
transitions to the "Receiving+Sending" state.
This MEP makes no claims about the disposition or handling of SOAP faults generated
by the requesting SOAP node during any processing of the response message that
follows the "Success" state in the requesting SOAP node's state transition table (see
Table 6).
This message exchange pattern is identified by the URI (see SOAP 1.2 Part 1 [SOAP
Part 1] SOAP Features):
"http://www.w3.org/2003/05/soap/mep/soap-response/"
6.3.2 Description
The SOAP Response MEP defines a pattern for the exchange of a non-SOAP message
acting as a request followed by a SOAP message acting as a response. In the absence
of failure in the underlying protocol, this MEP consists of exactly two messages, only
one of which is a SOAP message:
The scope of a SOAP Response MEP is limited to the request for an exchange of a
response message between one requesting and one responding SOAP node. This
pattern does not mandate any correlation between multiple requests nor specific timing
for multiple requests. Implementations MAY choose to support multiple ongoing
requests (and associated response processing) at the same time.
Note:
This MEP cannot be used in conjunction with features expressed as SOAP header
blocks in the request because there is no SOAP envelope in which to carry them.
Property name:
http://www.w3.org/2003/05/soap/bindingFramework/ExchangeContext/Fai
lureReason
Value: "None"
Notes: A relative URI that will be resolved against the value of the property
named
http://www.w3.org/2002/12/soap/bindingFramework/ExchangeContext/Exc
hangePatternName
Property name:
http://www.w3.org/2003/05/soap/bindingFramework/ExchangeContext/Rol
e
Value: "RequestingSOAPNode"
Notes: A relative URI that will be resolved against the value of the property
named
http://www.w3.org/2002/12/soap/bindingFramework/ExchangeContext/Exc
hangePatternName
Property name:
http://www.w3.org/2003/05/soap/bindingFramework/ExchangeContext/Sta
te
Value: "Init"
Notes: A relative URI whose base URI is the value of the property named
http://www.w3.org/2002/12/soap/bindingFramework/ExchangeContext/Rol
e
Property name:
http://www.w3.org/2003/05/soap/mep/ImmediateDestination
Value: An identifier (URI) that denotes the responding SOAP node
There may be other properties related to the operation of the message exchange
context instance. Such properties are initialized according to their own feature
specifications.
Once the message exchange context is initialized, control of the context is passed to a
(conforming) local binding instance.
The diagram below shows the logical state transitions at the requesting and responding
SOAP nodes during the lifetime of the message exchange. At each SOAP node, the
local binding instance updates (logically) the value of the
http://www.w3.org/2003/05/soap/bindingFramework/ExchangeContext/State property
to reflect the current state of the message exchange. The state names are relative
URIs, relative to a Base URI value carried in the
http://www.w3.org/2003/05/soap/bindingFramework/ExchangeContext/Role property
of the local message exchange context.
When the local binding instance at the responding SOAP node starts to receive an
inbound request message, it (logically) instantiates a message exchange context. Table
10 describes the properties that the binding initializes as part of the context's instantiation.
Table 10: Instantiation of Message Exchange Context for an inbound request message
Property name:
http://www.w3.org/2003/05/soap/bindingFramework/ExchangeContext/ExchangePatte
rnName
Value: "http://www.w3.org/2003/05/soap/mep/soap-response/"
Notes: Initialized as early as possible during the life cycle of the message exchange.
Property name:
http://www.w3.org/2003/05/soap/bindingFramework/ExchangeContext/Fai
lureReason
Value: "None"
Notes: A relative URI that will be resolved against the value of the property
named
http://www.w3.org/2002/12/soap/bindingFramework/ExchangeContext/Exc
hangePatternName
Property name:
http://www.w3.org/2003/05/soap/bindingFramework/ExchangeContext/Rol
e
Value: "RespondingSOAPNode"
Notes: A relative URI that will be resolved against the value of the property
named
http://www.w3.org/2002/12/soap/bindingFramework/ExchangeContext/Exc
hangePatternName . Initialized as early as possible during the life cycle the
message exchange.
Property name:
http://www.w3.org/2003/05/soap/bindingFramework/ExchangeContext/Sta
te
Value: "Init"
Notes: A relative URI that will be resolved against the value of the property
named
http://www.w3.org/2002/12/soap/bindingFramework/ExchangeContext/Rol
e
When the requesting and responding SOAP nodes transition between states, the local
binding instance (logically) updates a number of properties. Table 11 and Table 12
describe these updates for the requesting and the responding SOAP nodes, respectively.
Table 11: Requesting SOAP Node State Transitions
CurrentState
CurrentState
During the operation of the SOAP Response MEP, the participating SOAP nodes may
generate SOAP faults.
If a SOAP fault is generated by the responding SOAP node while it is in the "Receiving"
state, the SOAP fault is made available in
http://www.w3.org/2003/05/soap/mep/OutboundMessage and the state machine
transitions to the "Sending" state.
This MEP makes no claims about the disposition or handling of SOAP faults generated
by the requesting SOAP node during any processing of the response message that
follows the "Success" state in the requesting SOAP node's state transition table (see
Table 11).
The SOAP Web Method feature is identified by the URI (see SOAP 1.2 Part 1 [SOAP
Part 1] SOAP Features):
"http://www.w3.org/2003/05/soap/features/web-method/"
6.4.2 Description
Underlying protocols designed for use on the World Wide Web provide for manipulation
of resources using a small set of Web methods such as GET, PUT, POST, and
DELETE. These methods are formally defined in the HTTP specification [RFC 2616], but
other underlying protocols might also support them. Bindings to HTTP or such other
protocols SHOULD use the SOAP Web Method feature to give applications control over
the Web methods to be used when sending a SOAP message.
Bindings supporting this feature SHOULD use the appropriate embodiment of that
method if provided by the underlying protocol; for example, the HTTP binding provided
with this specification represents the "GET" Web method as an HTTP GET request, and
the "POST" method as an HTTP POST request (see 7. SOAP HTTP Binding). Bindings
supporting this feature SHOULD provide to the receiving node indication of the Web
method used for transmission.
The SOAP Web Method feature defines a single property, which is described in Table
13.
Table 13: Property definition for the SOAP Web Method feature
Property
Property Name Property Description
Type
One of "GET", "POST",
"PUT", "DELETE" (or
http://www.w3.org/2003/05/soap/features/web- others which may Not
method/Method subsequently be added specified
to the repertoire of Web
methods.)
This specification provides for the use of the SOAP Web Method feature in conjunction
with the 6.2 SOAP Request-Response Message Exchange Pattern and 6.3 SOAP Response
Message Exchange Pattern message exchange patterns. This feature MAY be used with
other MEPs if and only if provided for in the specifications of those MEPs.
A responding node SHOULD respond in a manner consistent with the Web method
requested (e.g. a "GET" should result in retrieval of a representation of the identified
resource) or SHOULD fault in an application-specific manner if the Web method cannot
be supported.
Bindings implementing this feature MUST employ a Message Exchange Pattern with
semantics that are compatible with the Web method selected. For example, the SOAP
Response Message Exchange Pattern (see 6.3 SOAP Response Message Exchange
Pattern) is compatible with GET.
The SOAP Action feature is identified by the URI (see SOAP 1.2 Part 1 [SOAP Part 1]
SOAP Features):
"http://www.w3.org/2003/05/soap/features/action/"
6.5.2 Description
Many SOAP 1.2 underlying protocol bindings will likely utilize the "application/soap+xml"
media type (described in A. The application/soap+xml Media Type) to transmit XML
serializations of SOAP messages. The media type specifies an optional action
parameter, which can be used to optimize dispatch or routing, among other things. The
Action Feature specifies well-known URIs to indicate support for the action parameter
in bindings which use MIME, and also to refer to value of the parameter itself.
The SOAP Action feature defines a single property, which is described in Table 14. The
value of this property MUST be an absolute URI[RFC 3986] and MUST NOT be empty.
Table 14: Property definition for the SOAP Action feature
Property Name Property Type
http://www.w3.org/2003/05/soap/features/action/Action xsd:anyURI
Conversely, if a value arrives in the action parameter of the media type designator at a
SOAP receiver, the receiver MUST make that value available as the value of the
http://www.w3.org/2003/05/soap/features/action/Action property.
7.1.1 Optionality
The SOAP HTTP Binding is optional and SOAP nodes are NOT required to implement
it. A SOAP node that correctly and completely implements the SOAP HTTP Binding
may to be said to "conform to the SOAP 1.2 HTTP Binding."
The SOAP version 1.2 specification does not preclude development of other bindings to
HTTP or bindings to other protocols, but communication with nodes using such other
bindings is not a goal. Note that other bindings of SOAP to HTTP MAY be written to
provide support for SOAP Message exchange patterns other than 6.2 SOAP Request-
Response Message Exchange Pattern or the 6.3 SOAP Response Message Exchange
Pattern. Such alternate bindings MAY therefore make use of HTTP features and status
codes not required for this binding.
The SOAP HTTP binding defines a base URI according to the rules in HTTP/1.1 [RFC
2616]. I.e., the base URI is the HTTP Request-URI or the value of the HTTP Content-
Location header field.
Note:
SOAP HTTP Binding implementations need to account for the fact that HTTP/1.0
intermediaries (which may or may not also be SOAP intermediaries) may alter the
representation of SOAP messages, even in situations where both the initial SOAP
sender and ultimate SOAP receiver use HTTP/1.1.
Particularly when used with the 6.3 SOAP Response Message Exchange Pattern, the
HTTP messages produced by this binding are likely to be indistinguishable from those
produced by non-SOAP implementations performing similar operations. Accordingly,
some degree of interoperation can be made possible between SOAP nodes and other
HTTP implementations when using this binding. For example, a conventional Web
server (i.e., one not written specifically to conform to this specification) might be used to
respond to SOAP-initiated HTTP GET's with representations of Content-Type
"application/soap+xml". Such interoperation is not a normative feature of this
specification.
Even though HTTP often is used on the well-known TCP port 80, the use of HTTP is not
limited to that port. As a result, it is possible to have a dedicated HTTP server for
handling SOAP processing on a distinct TCP port. Alternatively, it is possible to use a
separate virtual host for dealing with SOAP processing. Such configuration, however, is
a matter of convenience and is not a requirement of this specification (see SOAP 1.2
Part 1 [SOAP Part 1] Binding to Application-Specific Protocols).
"http://www.w3.org/2003/05/soap/bindings/HTTP/"
Note:
Other SOAP Version 1.2 bindings to HTTP may permit other combinations of
http://www.w3.org/2003/05/soap/bindingFramework/ExchangeContext/ExchangePatter
nName and http://www.w3.org/2003/05/soap/features/web-method/Method .
A SOAP node instantiated at an HTTP client may assume the role (i.e., the
property
http://www.w3.org/2002/12/soap/bindingFramework/ExchangeContext/Role ) of
"RequestingSOAPNode".
A SOAP node instantiated at an HTTP server may assume the role (i.e., the
property
http://www.w3.org/2002/12/soap/bindingFramework/ExchangeContext/Role ) of
"RespondingSOAPNode".
The remainder of this section describes the MEP state machine and its relation to the
HTTP protocol. In the state tables below, the states are defined as values of the
property http://www.w3.org/2003/05/soap/bindingFramework/ExchangeContext/State
(see 6.2 SOAP Request-Response Message Exchange Pattern and 6.3 SOAP Response
Message Exchange Pattern), and are of type xs:anyURI . For brevity, relative URIs are
used, the base URI being the value of
http://www.w3.org/2003/05/soap/bindingFramework/ExchangeContext/Role .
The message exchange pattern in use is indicated by the HTTP method used in the
request. HTTP GET corresponds to the SOAP-Response MEP, HTTP POST
corresponds to the SOAP Request-Response MEP.
The overall flow of the behavior of a requesting SOAP node follows a state machine
description consistent with either 6.2 SOAP Request-Response Message Exchange Pattern
or 6.3 SOAP Response Message Exchange Pattern (differences are indicated as
necessary.) This binding supports streaming and, as a result, requesting SOAP nodes
MUST avoid deadlock by accepting and if necessary processing SOAP response
information while the SOAP request is being transmitted (see 6.2.3 State Machine
Description). The following subsections describe each state in detail.
7.5.1.1 Init
In the "Init" state, a HTTP request is formulated according to Table 16 and transmission of
the request is initiated.
7.5.1.2 Requesting
In the "Requesting" state, sending of the request continues while waiting for the start of
the response message. Table 17 details the transitions that take place when a requesting SOAP
node receives an HTTP status line and response header fields. For some status codes there is a choice of
possible next state. In cases where "Fail" is one of the choices, the transition is dependent on whether a
SOAP message is present in the HTTP response. If a SOAP message is present, the next state is
"Sending+Receiving" or "Receiving", otherwise the next state is "Fail". The choice between
"Sending+Receiving" and "Receiving" depends of the MEP in use: "Sending+Receiving" is the next state
for Request-Response while "Receiving" is the next state for SOAP-Response.
Table 17 refers to some but not all of the existing HTTP/1.1 [RFC 2616] status codes. In
addition to these status codes, HTTP provides an open-ended mechanism for
supporting status codes defined by HTTP extensions (see RFC 2817 [RFC 2817] for a
registration mechanism for new status codes). HTTP status codes are divided into
status code classes as described in HTTP [RFC 2616], section 6.1.1. The SOAP HTTP
binding follows the rules of any HTTP application which means that an implementation
of the SOAP HTTP binding must understand the class of any status code, as indicated
by the first digit, and treat any unrecognized response as being equivalent to the x00
status code of that class, with the exception that an unrecognized response must not be
cached.
Note:
There may be elements in the HTTP infrastructure configured to modify HTTP response
entity bodies for 4xx and 5xx status code responses. For example, some HTTP origin
servers have such a feature as a configuration option. This behavior may interfere with
the use of 4xx and 5xx status code responses carrying SOAP fault messages in HTTP
and it is recommended that such behavior be disabled for resources accepting
SOAP/HTTP requests. If the rewriting behavior cannot be disabled, SOAP/HTTP cannot
be used in such configurations.
7.5.1.3 Sending+Receiving
The response MAY be of content type other than "application/soap+xml". Such usage is
considered non-normative, and accordingly is not modeled in the state machine.
Interpretation of such responses is at the discretion of the receiver. Similarly, receipt of
any response entity-body with a status code of 202 is not normative. If such an
unexpected response is of type "application/soap+xml", then SOAP processing of that
response is beyond the scope of the specification for this binding.
7.5.1.4 Receiving
In the "Receiving" state (6.3 SOAP Response Message Exchange Pattern only), receiving
of the response message is completed. Only in the case of status code 200, the
response message is assumed to contain a SOAP envelope serialized according to the
rules for carrying SOAP messages in the media type given in the Content-Type header
field.
The response MAY be of content type other than "application/soap+xml". Such a result
is particularly likely when a SOAP request sent with a
http://www.w3.org/2003/05/soap/features/web-method/Method of "GET" is directed
(intentionally or otherwise) to a non-SOAP HTTP server. Such usage is considered non-
normative, and accordingly is not modeled in the state machine. Interpretation of such
responses is at the discretion of the receiver. Similarly, receipt of any response entity-
body with a status code of 202 is not normative. If such an unexpected response is of
type "application/soap+xml", then SOAP processing of that response is beyond the
scope of the specification for this binding.
"Success" and "Fail" are the terminal states of the Request-Response and SOAP-
Response MEPs. Control over the message exchange context returns to the local
SOAP node.
If the "success" state has been reached and if a SOAP envelope has been received,
then the local node is a SOAP Receiver as defined in SOAP 1.2 Part 1 [SOAP Part 1]
section Message Sender and Receiver Concepts, and in particular MUST obey the
requirement of section SOAP Nodes to process the message according to the SOAP
Processing Model (see SOAP Processing Model).
The overall flow of the behavior of a responding SOAP node follows a state machine
description consistent with either 6.2 SOAP Request-Response Message Exchange Pattern
or 6.3 SOAP Response Message Exchange Pattern (differences are indicated as
necessary). The following subsections describe each state in detail.
7.5.2.1 Init
In the "Init" state, the binding waits for the start of an inbound request message. Table
18 describes the errors that a responding SOAP node might generate while in the "Init" state. In this
state no SOAP message has been received, therefore the SOAP node cannot generate a SOAP fault.
7.5.2.2 Receiving
In the "Receiving" state, the binding receives the request and any associated message
and waits for the start of a response message to be available. Table 19 describes the
HTTP response header fields generated by the responding SOAP node. Table 20
describes the HTTP status codes associated with SOAP faults that can be generated by the responding
SOAP node.
7.5.2.3 Receiving+Sending
7.5.2.4 Sending
In the "Sending" state (6.3 SOAP Response Message Exchange Pattern only) the binding
completes transmission of the response message.
"Success" and "Fail" are the terminal states for the Request-Response and SOAP-
Response MEPs. From the point-of-view of the local node this message exchange has
completed.
Hex Digits
Note:
Note:
This transcoding is explicitly to Unicode scalar values ("code points") and not
to any particular character encoding scheme of Unicode, such as UTF-8 or
UTF-16.
Note:
Note: Properly formed surrogate pair sequences must be converted to their
respective scalar values ("code points") [That is, the sequence U+D800
U+DC00 should be transcoded to the character U+10000]. If the transcoding
begins with a Unicode encoding, non-conforming (non-shortest form) UTF-8
and UTF-16 sequences must be converted to their respective scalar values.
Note:
Case:
Let U1, U2, ... , U6 be the six hex digits [PROD: 5] such that Ci is "U+" U1
U2 ... U6 in the Unicode scalar value.
Case:
1. If U1=0, U2=0, U3=0, and U4=0, then let Xi="_x" U5 U6 "_".
B.2 Examples
Hello world -> Hello_x0020_world
Hello_xorld -> Hello_x005F_xorld
Helloworld_ -> Helloworld_
x -> x
xml -> _x0078_ml
-xml -> _x002D_xml
x-ml -> x-ml
These sections describe techniques that can be used when validation with W3C XML
schemas is desired for use by SOAP applications. Any errors or faults resulting from
such validation are beyond those covered by the normative Recommendation; from the
perspective of SOAP, such faults are considered to be application-level failures.
The minimal schema provides that any well formed XML document will validate, except
that where an xsi:type is provided, the type named must be built in, and the
corresponding element must be valid per that type. Thus, validation of a SOAP 1.2
message using a minimal schema approximates the behavior of the built-in types of
SOAP 1.1.