WS-Addressing defines a global
element, wsaw:UsingAddressing, that may be used to
indicate that an endpoint conforms to the WS-Addressing specification. The wsdl:required attribute MAY be used to indicate whether WS-Addressing
Message Addressing Properties are required in messages received from service
requesters. Table
3-1 outlines the requirements on messages sent from an endpoint based on
the contents of any preceding input message and how the use of addressing is
indicated in the WSDL.
MAPs in Input message |
UsingAddressing Present |
UsingAddressing Not Present |
|
wsdl:required="true" |
wsdl:required="false" |
||
Yes, using SOAP
headers with a soap:mustUnderstand value of "true" |
REQUIRED |
REQUIRED |
REQUIRED or
fault |
Yes, using
another protocol or using SOAP headers with a soap:mustUnderstand value of
"false" |
REQUIRED |
REQUIRED |
OPTIONAL |
No |
Fault |
OPTIONAL. If using
SOAP, MAP headers MUST NOT have a soap:mustUnderstand attribute with a value
of "true" |
OPTIONAL. If
using SOAP, MAP headers MUST NOT have a soap:mustUnderstand attribute with a
value of "true" |
If WS-A is engaged, use of the message
addressing properties MUST be fully compliant with this specification; in
particular, senders MUST use all message addressing properties mandated by the
Web Services Addressing 1.0 - Core[WS-Addressing-Core],
applicable WS-Addressing protocol bindings (e.g. Web Services Addressing 1.0 -
SOAP Binding[WS-Addressing-SOAP]),
and this specification, and MUST follow all applicable WS-Addressing normative
requirements.
The wsaw:UsingAddressing
element SHOULD appear as a child of the wsdl:binding
element. Alternatively, the wsaw:UsingAddressing
element MAY instead be included as a child of the wsdl20:endpoint (or
wsdl11:port) when an endpoint intends to indicate compliance with WS-Addressing
for a specific endpoint only.
The inclusion of the wsaw:UsingAddressing
element indicates that the applicable WS-Addressing specifications are
supported. This inclusion allows the usage of both anonymous or non-anonymous URIs
as addresses in an EPR. Specifically, when included in a SOAP binding,
the wsaw:UsingAddressing marker identifies the use of Web Services Addressing
1.0 bound to SOAP as defined by Web Services Addressing 1.0 - SOAP Binding[WS-Addressing-SOAP]. The element may extend the semantics of the endpoint's
WSDL binding. The semantics of the extension for SOAP1.1/HTTP is defined in
this document in Section 3.1.2.
3.1.1 wsaw:Anonymous
element:
WS-Addressing defines a wsaw:Anonymous element that may be only be used in conjunction
with wsaw:UsingAddressing element. This usage of this element is associated
with the usage constraints specified for wsaw:UsingAddressing
element. Hence, it MUST NOT contain the wsdl:required
attribute. In the following text, the term response endpoint refers to the [reply
endpoint] and [fault endpoint] Message Addressing Properties collectively.
The wsaw:Anonymous
element MAY have three distinct values that indicate three different levels of
support for handling anonymous addresses in EPRs:
·
optional: This value indicates that response endpoints in a request message MAY contain an
anonymous URI as an address.
·
required: This value indicates that response endpoints in a request message MUST always use
anonymous URI as an address.
If a response endpoint does not contain the anonymous URI as
an address value, then a predefined InvalidAddressingHeader
fault defined in Section 5.4.x.x of Web Services Addressing 1.0 - SOAP Binding[WS-Addressing-SOAP] MUST be
generated (I already raised a CR issue about this)
1. prohibited
This value indicates that response
endpoints in a request
message MUST NOT use anonymous URI as an address.
If a response endpoint contains the anonymous URI as an
address value, then a predefined InvalidAddressingHeader
fault defined in Section 5.4.x.x of Web Services Addressing 1.0 - SOAP Binding[WS-Addressing-SOAP] MUST be
generated.
This element MAY appear as a
child of operation element in a binding element in WSDL 1.1, or as a binding
operation extension element in WSDL 2.0.
3.1.2 Semantics of the anonymous address
In the context of a WSDL MEP, one of two basic alternatives may
occur:
1. A
response endpoint with the anonymous URI as its [address] is used to send an
outbound message. For example, the MEP
is in-out, the [reply endpoint] is anonymous, and the result of the operation
is a normal reply.
2. No
anonymous response endpoint is used, either because no outbound message is to
be sent, or because the response endpoint used is not anonymous. In this case, either
a. No
outbound message is sent at all (either none is required, as with an in-only
operation, or the response is to be sent to the none address)
b. A outbound
message is sent, but to an address other than the anonymous URI.
The following sections define how these alternatives are to be
handled in the context of SOAP1.1/HTTP and in the context of SOAP 1.2. In both cases, the general idea is that using
the anonymous address means that the inbound and outbound messages share a
single request-response connection.
Otherwise, the inbound message and outbound message (if any) use separate
connections.
3.1.2.1 Extension to SOAP
1.1/HTTP binding
The presence of the wsaw:UsingAddressing element in the binding or endpoint (port)
components of the endpoint description extends the semantics of the SOAP
1.1/HTTP binding, by relaxing the requirement that the outbound message be sent over the same HTTP connection over which the inbound
message was received.
1. When the anonymous address is used, the outbound
message MUST be sent over
the same HTTP connection as
the inbound message.
2. When the anonymous address is
not used, the receipt of
the inbound message
MUST be acknowledged with a status message (202) by the receiver using the HTTP
connection that generated the inbound message. The receipt message MUST contain an empty SOAP
envelope. (Lets discuss this
further)
a. If
no response is sent, no further action is required
b. When a non-anonymous
address is used, the outbound
message MUST be sent using
a separate connection using the address value of the specified by appropriate
response endpoint. If the connection is an
HTTP connection, the outbound message must be acknowledged as above.
3.1.2.1 Behavior for SOAP 1.2
1. When the anonymous address is used, then the inbound and
outbound messages together MUST comply with the SOAP request-response MEP
defined in section 6.2 of the SOAP 1.2 adjuncts, as bound to the transport of
the endpoint.
2. When the anonymous address is
not used, the sending of the
outbound message, if any, MUST NOT be part of the same SOAP MEP as the receipt
of the inbound message.
3.1.3 Examples:
Example 3-1. Indicating use of WS-Addressing using wsaw:UsingAddressing
in WSDL 2.0
<binding
name="reservationSOAPBinding"
interface="tns:reservationInterface"
type="http://www.w3.org/2005/08/wsdl/soap12"
wsoap:protocol="http://www.w3.org/2003/05/soap/bindings/HTTP">
<wsaw:UsingAddressing
wsdl:required="true" />
<operation ref="tns:opCheckAvailability"
wsoap:mep="http://www.w3.org/2003/05/soap/mep/request-response"
/>
<fault ref="tns:invalidDataFault"
wsoap:code="soap:Sender"
/>
</binding>
Example 3-2. Indicating use of WS-Addressing using wsaw:UsingAddressing
in WSDL 1.1
<binding
name="StockQuoteSoapBinding" type="tns:StockQuotePortType">
<soap:binding
style="document"
transport="http://schemas.xmlsoap.org/soap/http" />
<wsaw:UsingAddressing
wsdl:required="true" />
<operation name="GetLastTradePrice">
<soap:operation soapaction="http://example.com/GetLastTradePrice"
/>
<input>
<soap:body
use="literal" />
</input>
<output>
<soap:body
use="literal" />
</output>
</operation>
</binding>
Example 3-3. Indicating use of WS-Addressing using wsaw:UsingAddressing
that allows asynchronous responses in WSDL 1.1 and with a specific operation
that requires synchronous responses
<binding
name="StockQuoteSoapBinding" type="tns:StockQuotePortType">
<soap:binding
style="document"
transport="http://schemas.xmlsoap.org/soap/http" />
<wsaw:UsingAddressing
wsdl:required="true" />
<operation name="GetLastTradePrice">
<soap:operation soapaction="http://example.com/GetLastTradePrice"
/>
<input>
<soap:body
use="literal" />
</input>
<output>
<soap:body
use="literal" />
</output>
<wsaw:Anonymous>required</wsaw:Anonymous>
</operation>
<operation name=OtherOp>
</operation>
</binding>