3.1 UsingAddressing Extension Element

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.

                                                                                                                        

Table 3-1. MAPs Present in output message

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 and may extend the constraints of the WSDL binding being used using the @anonymousUseDefault attribute. That is, uses of the WS-Addressing specifications that may violate or are inconsistent with the semantics of the endpoint's WSDL binding are not supported unless explicitly stated.

 

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 inclusion of wsaw:UsingAddressing element indicates three different levels of support for handling anonymous addresses in EPRs that is determined by the value of the @anonymousUseDefault attribute defined as follows:

·         “Allowed”: This value indicates that [reply endpoint] or [fault endpoint] EPR in a request message MAY contain an anonymous URI as an address.

·         “Always”: This value indicates that [reply endpoint] and [fault endpoint] EPRs in a request message MUST always use anonymous URI as an address.

If [reply endpoint] or [fault endpoint] EPR 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)

·         “Never”: This value indicates that [reply endpoint] and [fault endpoint] EPRs in a request message MUST NOT use anonymous URI as an address.

If [reply endpoint] or [fault endpoint] EPR 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.

 

The default value of the @anonymousUseDefault attribute is “Allowed”.

 

3.1.1 wsaw:AnonymousUse element:

 

WS-Addressing defines a wsaw:AnonymousUse element that may be only be used in conjunction with wsaw:UsingAddressing element, hence this element MUST NOT contain the wsdl:required attribute.

 

The wsaw:AnonymousUse element may have three distinct values that are specified for @anonymousUseDefault attribute above.

 

This element may only appear as a child of operation element that is a child of binding element in WSDL 1.1, or as a binding operation extension element in WSDL 2.0. The purpose of the element is to specify the level of anonymous URI support for a specific operation. Unless indicated specifically by using wsaw:AnonymousUse element on a specific operation in a binding, all operations that are children of a binding element adhere to the default semantics that is implied wsaw:UsingAddressing/@anonymousUseDefault value that is given by the binding.

 

Note To Reader: We should consider to make the following restriction to make it simpler for implementations which is open for discussion.

 

{In particular, this element is used to specify more restricted semantics for the support of anonymous URIs as addresses in EPRs for specific operations. For example, a binding operation MAY NOT contain wsaw:AnonymousUse element with the value of “Always” when the @anonymousUseDefault value of the binding is “Never”.

}

 

 

3.1.2 SOAP 1.1/HTTP Extension Semantics by using wsaw:UsingAddressing element:

 

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. In the case of the WSDL SOAP/HTTP synchronous binding for request-response operations, the presence of the wsaw:UsingAddressing element may change the requirement that the response message be sent over the same HTTP channel over which the request was received depending on the value of the @anonymousUseDefault attribute value (or the presence of the wsaw:AnonymousUse element)  In this case, the wsa:replyTo header in the request MAY contain an address with a value different from the anonymous URI depending on the following semantics:

 

·         The “Allowed” value indicates that an extension to SOAP/HTTP binding is used that allows using a separate connection when needed. The extension allows a SOAP1.1/HTTP binding to use a separate connection for sending response messages, instead of using the same HTTP connection. This extension allows SOAP 1.1/HTTP to be used asynchronously as follows.

The response message MAY be sent over the same HTTP channel over which the request was received or by opening a separate connection. When the value of the [reply endpoint] in the request message contains the anonymous URI as the address, the response MUST be sent over the same HTTP channel.  However, when the value of [reply endpoint] contains an address that is different than the anonymous URI, this extension for the SOAP/HTTP binding requires that

·         The receipt of the request message MUST be acknowledged with a status message (202) by the receiver using the HTTP connection that generated the request. The receipt message MUST contain an empty SOAP envelope. 

·         The actual response MUST be sent using a separate connection using the address value of the response message specified by [reply endpoint].

·         The “Never” value indicates that the SOAP1.1/HTTP extension that allows multiple connections is not in use. In essence, the presence of the wsaw:UsingAddressing/@anonymousUseDefault or wsaw:AnonymousUse element with “Never” value is equivalent to not extending the semantics of the current SOAP1.1/HTTP bindings. In this case, the presence of the element does not change the requirement that the response message be sent over the same HTTP channel over which the request was received.

·         The “Always” value indicates that SOAP1.1/HTTP binding must always use a separate connection for sending response messages, instead of using the same HTTP connection. The extension requires SOAP 1.1/HTTP to be used always asynchronously as described above.

 

Note: We may consider including a paragraph here as a note to indicate that SOAP processing rules dictate how responses/errors are generated and sent to appropriate destinations depending on when the extensions are processed and engaged.

 

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

<binding name="StockQuoteSoapBinding" type="tns:StockQuotePortType">

  <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />

  <wsaw:UsingAddressing anonymousUseDefault=”Allowed” 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-4. Indicating use of WS-Addressing using wsaw:UsingAddressing that allows asynchronous responses in WSDL 1.1 and with a specific operation that only define synchronous responses

<binding name="StockQuoteSoapBinding" type="tns:StockQuotePortType">

  <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />

  <wsaw:UsingAddressing anonymousUseDefault=”Allowed” 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:AnonymousUse>Always</wsaw:AnonymousUse>

  </operation>

  <operation name=”OtherOp”>…</operation>…

</binding>