Asynch scenarios using a variety of underlying protocols, wsdl meps, and *To values

Author: David Orchard, BEA Systems

Table of Contents

  1. One Way
    1. In-only
    2. Robust In-only
    3. In-out
    4. Out-only
  2. Two Way
    1. In-only
    2. Robust In-only
      1. Robust In-only no FaultTo
      2. Robust In-only FaultTo
    3. In-out
      1. In-out no ReplyTo
      2. In-out ReplyTo

One Way Underlying Protocol

Binding uses an underlying protocol with no implicit return path for messages. The message template for protocol identified by the "mythical-oneway" uri schema and specified in wsdl 2.0 by the type="http://www.openuri.org/mythical-oneway/soap/" attribute and wsdl 1.1 by the onewayprotocol:binding transport="http://tempuri.org/mythical-oneway" element and attribute is
send DNSentry URI-path
message


In-only

diagram

WSDL 1.1

full
fragment:

<portType name="ServicePortType"> <operation name="Ping"> <input message="s0:PingMessageIn"/> </operation> </portType> <binding name="ServiceBinding" type="s0:ServicePortType"> <onewayprotocol:binding transport="http://tempuri.org/mythical-oneway" style="document" /> <operation name="Ping"> <onewayprotocol:operation style="document" /> <input name="Ping"> <onewayprotocol:body use="literal" /> </input> </operation> </binding>

WSDL 2.0

full n/a
fragment:

<interface name="ServiceInterface"> <operation name="Ping" pattern="http://www.w3.org/@@@@/@@/wsdl/in-only"> <input element="s0:PingMessageIn"/> </operation> </interface> <binding name="ServiceBinding" interface="s0:ServiceInterface" type="="http://www.openuri.org/mythical-oneway/soap/" /> <operation ref="s0:Ping" /> </binding>

SOAP mythical one-way

full soap body
fragment:

send microsoft.com /wsaService/service.ashx <soap:envelope> <soap:header> <wsa:Action>Ping</wsa:Action> </soap:header> </soap:envelope>

Robust In-only

diagram

WSDL 1.1

not possible

WSDL 2.0

full n/a
fragment:

<interface name="ServiceInterface"> <operation name="EchoFault" pattern="http://www.w3.org/@@@@/@@/wsdl/robust-in-only"> <input element="s0:EchoFault"/> <outfault ref="s0:Fault"/> <!-- not currently defined..-> </operation> </interface> <binding name="ServiceBinding" interface="s0:ServiceInterface" type="http://www.openuri.org/mythical-oneway/soap/" /> <operation ref="s0:EchoFault" /> </binding>

SOAP

full request full response
fragment:

send microsoft.com /wsaService/service.ashx <soap:envelope> <soap:header> <wsa:Action>http://tempuri.org/ServicePortType/EchoFault</wsa:Action> <wsa:FaultTo> <wsa:Address>mythical-oneway://microsoft.com/wsaService/service.ashx</wsa:Address> <wsa:ReferenceProperties> <rp:CustomerKey xmlns:rp="http://tempuri.org/ReferenceProperties/Headers">ABCDEF</rp:CustomerKey> </wsa:ReferenceProperties> </wsa:FaultTo> </soap:header> </soap:envelope> send microsoft.com /wsaService/service.ashx <soap:envelope> <soap:header> <wsa:Action>http://schemas.xmlsoap.org/ws/2004/03/addressing/fault </wsa:Action> <rp:CustomerKey xmlns:rp="http://tempuri.org/ReferenceProperties/Headers">ABCDEF</rp:CustomerKey> </soap:header> <soap:Body> <soap:Fault/> </soap:Body> </soap:envelope>

In-Out

diagram

WSDL 1.1

full
fragment:

<portType name="ServicePortType"> <operation name="EchoString"> <input message="s0:EchoStringMessageIn"/> <output message="s0:EchoStringMessageOut"/> </operation> </portType> <binding name="ServiceBinding" type="s0:ServicePortType"> <onewayprotocol:binding transport="http://tempuri.org/mythical-oneway" style="document" /> <operation name="EchoString"> <onewayprotocol:operation style="document" /> <input name="EchoString"> <onewayprotocol:body use="literal" /> </input> </operation> </binding>

WSDL 2.0

full n/a
fragment:

<interface name="ServiceInterface"> <operation name="EchoString" pattern="http://www.w3.org/@@@@/@@/wsdl/in-out">> <input element="s0:EchoStringMessageIn"/> <output element="s0:EchoStringMessageOut"/> </operation> </interface> <binding name="ServiceBinding" interface="s0:ServiceInterface" type="="http://www.openuri.org/mythical-oneway/soap/" /> <operation ref="s0:EchoString" /> </binding>

SOAP

full request full response
fragment:

send microsoft.com /wsaService/service.ashx <soap:envelope> <soap:header> <wsa:Action>http://tempuri.org/ServicePortType/EchoString</wsa:Action> <wsa:ReplyTo> <wsa:Address>mythical-oneway://microsoft.com/wsaService/service.ashx</wsa:Address> </wsa:ReplyTo> </soap:header> </soap:envelope> send microsoft.com /wsaService/service.ashx <soap:envelope> <soap:header> <wsa:Action>http://tempuri.org/ServicePortType/EchoStringResponse</wsa:Action> </soap:header> </soap:envelope>

Out-only

diagram


Two Way Underlying Protocol

Binding uses an underlying protocol with an implicit back-channel for returning messages.


In-only

diagram

WSDL 1.1

full
fragment:

<portType name="ServicePortType"> <operation name="Ping"> <input message="s0:PingMessageIn"/> </operation> </portType> <binding name="ServiceBinding" type="s0:ServicePortType"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" /> <operation name="Ping"> <soap:operation soapAction="http://tempuri.org/ServicePortType/Ping" style="document" /> <input name="Ping"> <soap:body use="literal" /> </input> </operation> </binding>

WSDL 2.0

full
fragment:

<interface> <operation name="Ping" pattern="http://www.w3.org/@@@@/@@/wsdl/in-only"> <input element="s0:PingMessageIn"/> </operation> </interface> <!-- This is illegal as the SOAP binding is not defined for one-way meps --> <binding name="ServiceBinding" interface="s0:ServiceInterface" type="http://www.w3.org/@@@@/@@/wsdl/soap" /> <operation ref="s0:Ping" /> </binding>

SOAP

full
fragment:

POST /wsaService/service.ashx HTTP/1.1 <soap:envelope> <soap:header> <wsa:Action>Ping</wsa:Action> </soap:header> </soap:envelope> HTTP/1.1 202 Accepted Content-Length: 0

Robust in-only

WSDL 1.1

not possible

WSDL 2.0

n/a
fragment:

<interface name="ServiceInterface"> <operation name="EchoFault" pattern="http://www.w3.org/@@@@/@@/wsdl/robust-in-only"> <input element="s0:EchoFault"/> <outfault ref="s0:Fault"/> <!-- not currently defined..-> </interface> <!-- This is illegal as the SOAP binding is not defined for Robust-in-only mep --> <binding name="ServiceBinding" interface="s0:ServiceInterface" type="http://www.w3.org/@@@@/@@/wsdl/soap" /> <operation ref="s0:EchoFault" /> </binding>

Robust in-only no FaultTo

No FaultTo specified.

diagram

SOAP

full request full response
fragment:

POST /wsaService/service.ashx HTTP/1.1 <soap:envelope> <soap:header> <wsa:Action>http://tempuri.org/ServicePortType/EchoFault</wsa:Action> </soap:header> </soap:envelope> HTTP/1.1 500 <soap:envelope> <soap:header> <wsa:Action>http://schemas.xmlsoap.org/ws/2004/03/addressing/fault </wsa:Action> </soap:header> <soap:Body> <soap:Fault/> </soap:Body> </soap:envelope>

Robust in-only FaultTo

FaultTo specified.

Note that the previous scenario, a fault on the return path, is allowed when a FaultTo is specified. The messages flows in this pattern and the previous are valid.

diagram

SOAP

full request full response
fragment:

POST /wsaService/service.ashx HTTP/1.1 <soap:envelope> <soap:header> <wsa:Action>http://tempuri.org/ServicePortType/EchoFault</wsa:Action> <wsa:FaultTo> <wsa:Address>http://microsoft.com/wsaService/service.ashx</wsa:Address> <wsa:ReferenceProperties> <rp:CustomerKey xmlns:rp="http://tempuri.org/ReferenceProperties/Headers">ABCDEF</rp:CustomerKey> </wsa:ReferenceProperties> </wsa:FaultTo> </soap:header> </soap:envelope> HTTP/1.1 202 OK POST /wsaService/service.ashx HTTP/1.1 <soap:envelope> <soap:header> <wsa:Action>http://schemas.xmlsoap.org/ws/2004/03/addressing/fault </wsa:Action> <rp:CustomerKey xmlns:rp="http://tempuri.org/ReferenceProperties/Headers">ABCDEF</rp:CustomerKey> </soap:header> <soap:Body> <soap:Fault/> </soap:Body> </soap:envelope> HTTP/1.1 202 OK

In-out

WSDL 1.1

full
fragment:

<portType name="ServicePortType> <operation name="EchoStrong"> <input message="s0:EchoStringMessageIn"/> <output message="s0:EchoStringMessageOut"/> </operation> </portType> <binding name="ServiceBinding" type="s0:ServicePortType"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" /> <operation name="EchoString"> <soap:operation soapAction="http://tempuri.org/ServicePortType/EchoString" style="document" /> <input name="EchoString"> <soap:body use="literal" /> </input> <output name="EchoStringResponse"> <soap:body use="literal" /> </output> </operation> </binding>

WSDL 2.0

full
fragment:

<interface name="ServiceEnterface"> <operation name="EchoString" pattern="http://www.w3.org/@@@@/@@/wsdl/in-out">> <input element="s0:EchoStringMessageIn"/> <output element="s0:EchoStringMessageOut"/> </operation> </interface> <binding name="ServiceBinding" interface="s0:ServiceInterface" type="http://www.w3.org/@@@@/@@/wsdl/soap" /> <operation ref="s0:EchoString" /> </binding>

In-out ReplyTo=Anonymous

Anonymous ReplyTo.

diagram

SOAP

full request full response
fragment:

POST /wsaService/service.ashx HTTP/1.1 <soap:envelope> <soap:header> <wsa:Action>http://tempuri.org/ServicePortType/EchoString</wsa:Action> <wsa:ReplyTo> <wsa:Address>*http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous*</wsa:Address> </wsa:ReplyTo> </soap:header> </soap:envelope> HTTP/1.1 200 Accepted <soap:envelope> <soap:header> <wsa:Action>http://tempuri.org/ServicePortType/EchoStringResponse</wsa:Action> </soap:header> </soap:envelope>

In-out ReplyTo

ReplyTo contains value.

Note this completely overrides the WSDL definition for soap bindings, as the WSDL says 1 soap request response mep is used with 1 HTTP protocol message.

diagram

SOAP

full request full response
fragment:

POST /wsaService/service.ashx HTTP/1.1 <soap:envelope> <soap:header> <wsa:Action>http://tempuri.org/ServicePortType/EchoString</wsa:Action> <wsa:ReplyTo> <wsa:Address>http://microsoft.com/wsaService/service.ashx</wsa:Address> </wsa:ReplyTo> </soap:header> </soap:envelope> HTTP/1.1 202 Accepted POST /wsaService/service.ashx HTTP 1.1 <soap:envelope> <soap:header> <wsa:Action>http://tempuri.org/ServicePortType/EchoStringResponse</wsa:Action> </soap:header> </soap:envelope> HTTP/1.1 202 Accepted