<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head profile="http://internetalchemy.org/2003/02/profile"> <link rel="foaf" type="application/rdf+xml" title="FOAF" href="http://www.openlinksw.com/dataspace/uda/about.rdf" /> <link rel="schema.dc" href="http://purl.org/dc/elements/1.1/" /> <meta name="dc.title" content="15. Web Services" /> <meta name="dc.subject" content="15. Web Services" /> <meta name="dc.creator" content="OpenLink Software Documentation Team ; " /> <meta name="dc.copyright" content="OpenLink Software, 1999 - 2009" /> <link rel="top" href="index.html" title="OpenLink Virtuoso Universal Server: Documentation" /> <link rel="search" href="/doc/adv_search.vspx" title="Search OpenLink Virtuoso Universal Server: Documentation" /> <link rel="parent" href="webservices.html" title="Chapter Contents" /> <link rel="prev" href="vwsssupport.html" title="WS-Security (WSS) Support in Virtuoso SOAP Server" /> <link rel="next" href="warm.html" title="Web Services Reliable Messaging Protocol (WS-ReliableMessaging)" /> <link rel="shortcut icon" href="../images/misc/favicon.ico" type="image/x-icon" /> <link rel="stylesheet" type="text/css" href="doc.css" /> <link rel="stylesheet" type="text/css" href="/doc/translation.css" /> <title>15. Web Services</title> <meta http-equiv="Content-Type" content="text/xhtml; charset=UTF-8" /> <meta name="author" content="OpenLink Software Documentation Team ; " /> <meta name="copyright" content="OpenLink Software, 1999 - 2009" /> <meta name="keywords" content="" /> <meta name="GENERATOR" content="OpenLink XSLT Team" /> </head> <body> <div id="header"> <a name="ws-routing" /> <img src="../images/misc/logo.jpg" alt="" /> <h1>15. Web Services</h1> </div> <div id="navbartop"> <div> <a class="link" href="webservices.html">Chapter Contents</a> | <a class="link" href="vwsssupport.html" title="WS-Security (WSS) Support in Virtuoso SOAP Server">Prev</a> | <a class="link" href="warm.html" title="Web Services Reliable Messaging Protocol (WS-ReliableMessaging)">Next</a> </div> </div> <div id="currenttoc"> <form method="post" action="/doc/adv_search.vspx"> <div class="search">Keyword Search: <br /> <input type="text" name="q" /> <input type="submit" name="go" value="Go" /> </div> </form> <div> <a href="http://www.openlinksw.com/">www.openlinksw.com</a> </div> <div> <a href="http://docs.openlinksw.com/">docs.openlinksw.com</a> </div> <br /> <div> <a href="index.html">Book Home</a> </div> <br /> <div> <a href="contents.html">Contents</a> </div> <div> <a href="preface.html">Preface</a> </div> <br /> <div class="selected"> <a href="webservices.html">Web Services</a> </div> <br /> <div> <a href="soap.html">SOAP</a> </div> <div> <a href="wsdl.html">WSDL</a> </div> <div> <a href="vfoafssl.html">WebID Protocol Support</a> </div> <div> <a href="voauth.html">OAuth Support</a> </div> <div> <a href="vwsssupport.html">WS-Security (WSS) Support in Virtuoso SOAP Server</a> </div> <div class="selected"> <a href="ws-routing.html">Web Services Routing Protocol (WS-Routing)</a> <div> <a href="#wsrconfig" title="Configuration">Configuration</a> <a href="#wsrtraversingmsgpaths" title="Traversing Message Paths">Traversing Message Paths</a> </div> </div> <div> <a href="warm.html">Web Services Reliable Messaging Protocol (WS-ReliableMessaging)</a> </div> <div> <a href="vwstrust.html">Web Services Trust Protocol (WS-Trust)</a> </div> <div> <a href="xmlxmla.html">XML for Analysis Provider</a> </div> <div> <a href="xmlrpc.html">XML-RPC support</a> </div> <div> <a href="syncml.html">SyncML</a> </div> <div> <a href="uddi.html">UDDI</a> </div> <div> <a href="expwsmodules.html">Exposing Persistent Stored Modules as Web Services</a> </div> <div> <a href="vsmx.html">Testing Web Published Web Services</a> </div> <div> <a href="bpel.html">BPEL Reference</a> </div> <div> <a href="xsql.html">XSQL</a> </div> <br /> </div> <div id="text"> <a name="ws-routing" /> <h2>15.6. Web Services Routing Protocol (WS-Routing)</h2> <p>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.</p> <p>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.</p> <p>This implementation supports HTTP only. Message Id's generated are UUIDs.</p> <a name="wsrconfig" /> <h3>15.6.1. Configuration</h3> <p>Setting-up the WS-Routing for a SOAP service requires you to:</p> <ol> <li> <p>make a virtual directory bound to the SOAP endpoint processor (/SOAP)</p> </li> <li> <p>add the following SOAP options:</p> <ul> <li>WS-RP=yes;</li> <li>wsrp-from=[identification for endpoint];</li> </ul> </li> </ol> <br /> <a name="wsrtraversingmsgpaths" /> <h3>15.6.2. Traversing Message Paths</h3> <p>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.</p> <p>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.</p> <p>A WS-Routing receiver receiving a WS-Routing message inspects the SOAP header and performs the following operations:</p> <ul> <li>If no "fwd" element is present or if the "fwd" element does not contain any "via" elements then inspect the "to" element and verify that the value identifies itself. If this is the case then THIS receiver is the ultimate destination. If there is no "to" element or if the value of the "to" element does not identify THIS WS-Routing receiver then generate a fault.</li> <li>If the "fwd" element is present and contains one or more "via" element(s) then remove the top "via" element listed in the "fwd" element and verify that the value of that "via" element is either empty or identifies THIS WS-Routing receiver. Failing that generate an appropriate WS-Routing fault If, after removing the top "via" element there are no remaining "via" element(s) listed in the "fwd" element, and there is no "to" element, then THIS WS-Routing receiver is the ultimate destination.</li> </ul> <p>A WS-Routing intermediary MUST follow these additional rules:</p> <ul> <li>If a "rev" element is present then add a "via" element as the first "via" element listed in the "rev" element with a value indicating the reverse path endpoint. If a reverse path endpoint cannot be provided then generate a 751 "Reverse Path Unavailable" WS-Routing fault.</li> <li>If one or more "via" element(s) remain in the "fwd" element then forward the WS-Routing message to the endpoint identified by the new top "via" element listed in the "fwd" element.</li> <li>If there are no remaining "via" element(s) listed in the "fwd" element but there is a "to" element then forward the WS-Routing message to the endpoint identified by the "to" element.</li> <li>In the last two cases if the forwarding does not succeed then generate the appropriate WS-Routing fault.</li> </ul> <a name="wsrexample" /> <div class="example"> <div class="exampletitle">WS Routing Example</div> <p>Here is an example SOAP call from a client to an endpoint D.com via intermediaries B.com and C.com:</p> <div> <pre class="programlisting"> +------------+ +------------+ +------------+ +-------------+ | Initial | | WS-Routing | | WS-Routing | | Ultimate | | WS-Routing |-->|Intermediary|-->|Intermediary|-->| WS-Routing | | Sender A |<--| B |<--| C |<--| Receiver D | +------------+ +------------+ +------------+ +-------------+ HTTP HTTP HTTP </pre> </div> <p>Request from client to intermediary B</p> <div> <pre class="programlisting"> <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> </pre> </div> <p>Request from intermediary B to intermediary C</p> <div> <pre class="programlisting"> <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> </pre> </div> <p>Request from intermediary C to endpoint D</p> <div> <pre class="programlisting"> <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> </pre> </div> <p>Response from endpoint to C</p> <div> <pre class="programlisting"> <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> </pre> </div> <p>Response from intermediary C to B</p> <div> <pre class="programlisting"> <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> </pre> </div> <p>Response from intermediary B to client</p> <div> <pre class="programlisting"> <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> </pre> </div> </div> <br /> <table border="0" width="90%" id="navbarbottom"> <tr> <td align="left" width="33%"> <a href="vwsssupport.html" title="WS-Security (WSS) Support in Virtuoso SOAP Server">Previous</a> <br />WS-Security (WSS) Support in Virtuoso SOAP Server</td> <td align="center" width="34%"> <a href="webservices.html">Chapter Contents</a> </td> <td align="right" width="33%"> <a href="warm.html" title="Web Services Reliable Messaging Protocol (WS-ReliableMessaging)">Next</a> <br />Web Services Reliable Messaging Protocol (WS-ReliableMessaging)</td> </tr> </table> </div> <div id="footer"> <div>Copyright© 1999 - 2009 OpenLink Software All rights reserved.</div> <div id="validation"> <a href="http://validator.w3.org/check/referer"> <img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /> </a> <a href="http://jigsaw.w3.org/css-validator/"> <img src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" height="31" width="88" /> </a> </div> </div> </body> </html>