This document illustrates a number of ws-addressing scenarios with wsdl and soap fragment exemplars. It is intended for Web services related working groups to use for their designs and deliberations. This does not replace any existing specifications.
The term "two-way" protocol means a protocol that has a back-channel for responses. The canonical example is HTTP.
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
POST /EchoFault HTTP/1.1
http://example.com/someuniquestringhttp://tempuri.org/ServicePortType/EchoFault
HTTP/1.1 200
Robust in-only FaultTo
FaultTo specified.
Note: the previous scenario showing a fault on the return path is allowed when a FaultTo is specified. The messages flows in this pattern and the previous are valid. Is there an issue for the sender to know when it gets an HTTP 500 whether FaultTo still could be used?
POST /EchoFault HTTP/1.1
http://example.com/someuniquestringhttp://tempuri.org/ServicePortType/EchoFaulthttp://example.com/FaultABCDEF
HTTP/1.1 202 OK
POST /Fault HTTP/1.1
http://example.com/someuniquestringhttp://example.com/someotheruniquestringhttp://schemas.xmlsoap.org/ws/2004/03/addressing/fault
ABCDEF
HTTP/1.1 202 OK
POST /EchoString HTTP/1.1
http://example.com/someuniquestringhttp://tempuri.org/ServicePortType/EchoStringhttp://www.w3.org/2005/03/addressing/role/anonymous
HTTP/1.1 200 Accepted
http://example.com/someuniquestringhttp://example.com/someotheruniquestringhttp://tempuri.org/ServicePortType/EchoStringResponse
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.
POST /EchoString HTTP/1.1
http://example.com/someuniquestringhttp://tempuri.org/ServicePortType/EchoStringhttp://example.com/Echo
HTTP/1.1 202 Accepted
POST /Echo HTTP 1.1
http://example.com/someuniquestringhttp://example.com/someotheruniquestringhttp://tempuri.org/ServicePortType/EchoStringResponse
HTTP/1.1 202 Accepted
SOAP Fault generated. A fault is generated, perhaps before the ReplyTo or FaultTo is parsed.
full n/a fragment:
POST /EchoString HTTP/1.1
http://example.com/someuniquestringhttp://tempuri.org/ServicePortType/EchoStringhttp://example.com/Echo
HTTP/1.1 500
http://example.com/someuniquestringhttp://example.com/someotheruniquestringhttp://schemas.xmlsoap.org/ws/2004/03/addressing/fault
Appendix
Contains informative and more complex scenarios.
Protocol switch from Two-way to One-way and ReplyTo
Two different protocols are used and the 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.
Is this legal? In particular, the soap request-response mep says that upon a 3xx go back to init state which means an HTTP POST must be used. Is it legal to switch from a request-response to soap-response mep?
I assumed an extension element (wspoll:onemep) to indicate one way wsdl mep, but should one or two WSDL meps be used?
WSDL 1.1
full n/a fragment:
WSDL 2.0
full n/a fragment:
>
SOAP
full n/a. fragment:
POST /EchoString HTTP/1.1
http://example.com/someuniquestringhttp://tempuri.org/ServicePortType/EchoString
HTTP/1.1 300 Redirect
Content-Location http://example.com/EchoStringResource
GET /EchoStringResource HTTP/1.1
HTTP/1.1 200 OK
GET /EchoStringResource HTTP/1.1
HTTP/1.1 200 OK
http://example.com/anotheruniquestringhttp://example.com/someuniquestringhttp://tempuri.org/ServicePortType/EchoStringResult
Two-way protocol where response contains request (aka Reverse HTTP)
I need more input on this. Some questions:
What is the wsa:Action for the first message?
How is the binding specified?
Can the last message contain another request (ie pipelined)?
Anonymous ReplyTo on first message, then ReplyTo contains value on second message.
SOAP
fragment:
POST /getRequest HTTP/1.1
http://example.com/someuniquestringhttp://tempuri.org/ServicePortType/getRequesthttp://www.w3.org/2005/03/addressing/role/anonymous
HTTP/1.1 200 Accepted
http://example.com/someuniquestringhttp://example.com/someotheruniquestringhttp://tempuri.org/ServicePortType/EchoStringhttp://example.com/EchoResult
POST /EchoResult HTTP/1.1
http://example.com/yetanotheruniquestringhttp://example.com/someotheruniquestringhttp://tempuri.org/ServicePortType/EchoStringResult
HTTP/1.1 202 OK