The SOAP Routing Protocol (WS-Routing) is a SOAP-based, stateless protocol for exchanging SOAP messages from an initial sender to an ultimate receiver, potentially via a set of intermediaries. The WS-Routing protocol is implemented as a SOAP extension, embedded in a SOAP Header entry.
The WS-Routing implementation consists of SOAP Header processing. The header processing handler for the WS-Routing header determines if the Virtuoso SOAP server can act as an intermediary or a endpoint depending on the rules in message path.
This implementation supports HTTP only. Message Id's generated are UUIDs.
Setting-up the WS-Routing for a SOAP service requires you to:
make a virtual directory bound to the SOAP endpoint processor (/SOAP)
add the following SOAP options:
The initial WS-Routing sender generates a WS-Routing "path" header that indicates the route. The path can indicate a route via one or more intermediaries using the "via" elements as sub-elements of the "fwd" element. The initial sender indicates the ultimate destination by using a "to" element. In the absence of a "to" element the ultimate destination is deduced by the last "via" in the "fwd" element. The second option occurs most commonly when an ultimate destination reverses roles, becomes an initial sender, and uses the reverse path in a received message as a forward path to send a response to the original sender.
In addition, the initial WS-Routing sender inserts a reverse path for indicating where the initial sender can receive reverse path messages. The initial sender sets the ultimate destination in the reverse path using a "via" element as a sub-element of the "rev" element.
A WS-Routing receiver receiving a WS-Routing message inspects the SOAP header and performs the following operations:
A WS-Routing intermediary MUST follow these additional rules:
Here is an example SOAP call from a client to an endpoint D.com via intermediaries B.com and C.com:
+------------+ +------------+ +------------+ +-------------+ | Initial | | WS-Routing | | WS-Routing | | Ultimate | | WS-Routing |-->|Intermediary|-->|Intermediary|-->| WS-Routing | | Sender A |<--| B |<--| C |<--| Receiver D | +------------+ +------------+ +------------+ +-------------+ HTTP HTTP HTTP
Request from client to intermediary B
<S:Envelope> <S:Header> <m:path xmlns:m="http://schemas.xmlsoap.org/rp/" S:actor="http://schemas.xmlsoap.org/soap/actor/next" S:mustUnderstand="1"> <m:action>http://soapinterop.org/</m:action> <m:to>http://D.com/router</m:to> <m:id>uuid:09233523-345b-4351-b623-5dsf35sgs5d6</m:id> <m:fwd> <m:via>http://B.com/router</m:via> <m:via>http://C.com/router</m:via> </m:fwd> <m:rev /> </m:path> </S:Header> <S:Body> ... </S:Body> </S:Envelope>
Request from intermediary B to intermediary C
<n0:Envelope> <n0:Header> <n2:path xmlns:n2="http://schemas.xmlsoap.org/rp/" n0:actor="http://schemas.xmlsoap.org/soap/actor/next" n0:mustUnderstand="1"> <n2:action>http://soapinterop.org/</n2:action> <n2:to>http://D.com/router</n2:to> <n2:id>uuid:09233523-345b-4351-b623-5dsf35sgs5d6</n2:id> <n2:fwd> <n2:via>http://C.com/router</n2:via> </n2:fwd> <n2:rev> <n2:via /> </n2:rev> </n2:path> </n0:Header> <n0:Body> ... </n0:Body> </n0:Envelope>
Request from intermediary C to endpoint D
<n0:Envelope> <n0:Header> <n2:path xmlns:n2="http://schemas.xmlsoap.org/rp/" n0:actor="http://schemas.xmlsoap.org/soap/actor/next" n0:mustUnderstand="1"> <n2:action>http://soapinterop.org/</n2:action> <n2:to>http://D.com/router</n2:to> <n2:id>uuid:09233523-345b-4351-b623-5dsf35sgs5d6</n2:id> <n2:fwd /> <n2:rev> <n2:via /> <n2:via /> </n2:rev> </n2:path> </n0:Header> <n0:Body> ... </n0:Body> </n0:Envelope>
Response from endpoint to C
<n0:Envelope> <n0:Header> <n2:path xmlns:n2="http://schemas.xmlsoap.org/rp/" n0:actor="http://schemas.xmlsoap.org/soap/actor/next" n0:mustUnderstand="1"> <n2:action>http://soapinterop.org/</n2:action> <n2:id>uuid:2b2d09ec-a93a-11d6-be21-c9f55c969fe7</n2:id> <n2:relatesTo>uuid:09233523-345b-4351-b623-5dsf35sgs5d6</n2:relatesTo> <n2:fwd> <n2:via /> <n2:via /> </n2:fwd> <n2:rev> <n2:via>http://D.com/router</n2:via> </n2:rev> <n2:from /> </n2:path> </n0:Header> <n0:Body> ... </n0:Body> </n0:Envelope>
Response from intermediary C to B
<n0:Envelope> <n0:Header> <n2:path xmlns:n2="http://schemas.xmlsoap.org/rp/" n0:actor="http://schemas.xmlsoap.org/soap/actor/next" n0:mustUnderstand="1"> <n2:action>http://soapinterop.org/</n2:action> <n2:id>uuid:2b2d09ec-a93a-11d6-be21-c9f55c969fe7</n2:id> <n2:relatesTo>uuid:09233523-345b-4351-b623-5dsf35sgs5d6</n2:relatesTo> <n2:fwd> <n2:via /> </n2:fwd> <n2:rev> <n2:via>http://C.com/router</n2:via> <n2:via>http://D.com/router</n2:via> </n2:rev> <n2:from /> </n2:path> </n0:Header> <n0:Body> ... </n0:Body> </n0:Envelope>
Response from intermediary B to client
<n0:Envelope> <n0:Header> <n2:path xmlns:n2="http://schemas.xmlsoap.org/rp/" n0:actor="http://schemas.xmlsoap.org/soap/actor/next" n0:mustUnderstand="1"> <n2:action>http://soapinterop.org/</n2:action> <n2:id>uuid:2b2d09ec-a93a-11d6-be21-c9f55c969fe7</n2:id> <n2:relatesTo>uuid:09233523-345b-4351-b623-5dsf35sgs5d6</n2:relatesTo> <n2:fwd /> <n2:rev> <n2:via>http://B.com/router</n2:via> <n2:via>http://C.com/router</n2:via> <n2:via>http://D.com/router</n2:via> </n2:rev> <n2:from /> </n2:path> </n0:Header> <n0:Body> ... </n0:Body> </n0:Envelope>
Previous
WS-Security (WSS) Support in Virtuoso SOAP Server |
Chapter Contents |
Next
Web Services Reliable Messaging Protocol (WS-ReliableMessaging) |