WCF uses policy assertions to indicate endpoint support for a particular WS-Addressing version.
The following policy assertion has Endpoint Policy Subject [WS-PA] and indicates messages sent and received from the endpoint must use WS-Addressing 2004/08.
This policy assertion augments the WS-Addressing 2004/08 specification.
The following policy assertion has an Endpoint Policy Subject [WS-PA] and indicates that messages sent and received from the endpoint must use WS-Addressing 2004/08.
<wsaw10:UsingAddressing />
The wsaw10:UsingAddressing element is borrowed from [WS-Addressing-WSDL] and is used in the context of WS-Policy in compliance with that specification, section 3.1.2.
Use of Addressing does not alter the semantics of WSDL 1.1, SOAP 1.1, and SOAP 1.2 HTTP Bindings. For example, if a reply is expected to a request that is sent to an endpoint that uses Addressing and WSDL SOAP 1.x HTTP binding, the reply must be sent by using the HTTP response.
However, there are message exchange patterns that benefit from having two independent converse HTTP connections established between the requester and the responder, for example, unsolicited one-way messages sent by the responder. WCF offers a utility by which two underlying transport channels can form a Composite Duplex channel, where one channel is used for input messages and the other is used for output messages. In the case of the HTTP Transport, Composite Duplex provides two converse HTTP connections. The requester uses one connection to send messages to the responder, and the responder uses the other to send messages back to the requester.
Use of the following assertion that has Endpoint Policy Subject [WS-PA] on endpoints that use WSDL 1.1 SOAP 1.x HTTP bindings requires two separate converse HTTP connections to be used for messages flowing from requester to responder and responder to requester, respectively.
The previous statement leads to the following requirements on the wsa:ReplyTo header for request messages:
-
R3514: Request messages sent to an endpoint must have a ReplyTo header with the [address] property not equal to "http://www.w3.org/2005/08/addressing/anonymous" if the endpoint uses a WSDL 1.1 SOAP 1.x HTTP binding and has a policy alternative with a wsap10:UsingAddressing or wsap:UsingAddressing assertion coupled with cdp:CompositeDuplex attached.
-
R3515: Request messages sent to an endpoint must have a ReplyTo header with the [address] property equal to "http://www.w3.org/2005/08/addressing/anonymous", or not have a ReplyTo header at all, if the endpoint uses a WSDL 1.1 SOAP 1.x HTTP binding and has a policy alternative with wsap10:UsingAddressing assertion and no cdp:CompositeDuplex assertion attached.
-
R3516: Request messages sent to an endpoint must have a ReplyTo header with an [address] property equal to "http://www.w3.org/2005/08/addressing/anonymous" if the endpoint uses a WSDL 1.1 SOAP 1.x HTTP binding and has a policy alternative with wsap:UsingAddressing assertion and no cdp:CompositeDuplex assertion attached.
The WS-addressing WSDL specification attempts to describe similar protocol bindings by introducing an element <wsaw:Anonymous/> with three textual values (required, optional, and prohibited) to indicate requirements on the wsa:ReplyTo header (section 3.2). Unfortunately, such element definition is not particularly usable as an assertion in the context of WS-Policy, because it requires domain-specific extensions to support the intersection of alternatives using such an element as an assertion. Such element definition also indicates the value of the ReplyTo header as opposed to the endpoint behavior on the wire, which makes it specific to HTTP transport.
WS-Addressing 2004/08 defines a wsa:Action attribute for the wsdl:portType/wsdl:operation/[wsdl:input | wsdl:output | wsdl:fault] elements. WS-Addressing 1.0 WSDL Binding (WS-ADDR10-WSDL) defines a similar attribute, wsaw10:Action.
The only difference between the two is the default Action pattern semantics described in section 3.3.2 of WS-ADDR and section 4.4.4 of WS-ADDR10-WSDL, respectively.
It is a reasonable to have two endpoints that share the same portType (or contract, in WCF terminology) but using different versions of WS-Addressing. But given that Action is defined by the portType and should not change across the endpoints that implement the portType, it becomes impossible to support both default action patterns.
To resolve this controversy, WCF supports a single version of the Action attribute.
B3521: WCF uses the wsaw10:Action attribute on wsdl:portType/wsdl:operation/[wsdl:input | wsdl:output | wsdl:fault] elements as defined in WS-ADDR10-WSDL to determine the Action URI for the corresponding messages irrespective of the WS-Addressing version used by the endpoint.