Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > 71d40963b505df4524269198e237b3e3 > files > 1000

virtuoso-opensource-doc-6.1.4-2.fc14.noarch.rpm

<!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 ;&#10;" />
  <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 ;&#10;" />
  <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&#39;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 &quot;path&quot; header that
  indicates the route.  The path can indicate a route via one or more
  intermediaries using the &quot;via&quot; elements as sub-elements of the
  &quot;fwd&quot; element.  The initial sender indicates the ultimate destination by
  using a &quot;to&quot; element.  In the absence of a &quot;to&quot; element the ultimate
  destination is deduced by the last &quot;via&quot; in the &quot;fwd&quot; 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 &quot;via&quot; element as a sub-element of the &quot;rev&quot; 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 &quot;fwd&quot; element is present or if the &quot;fwd&quot; element does not
   contain any &quot;via&quot; elements then inspect the &quot;to&quot; element and verify that the
   value identifies itself.  If this is the case then THIS receiver is the
   ultimate destination.  If there is no &quot;to&quot; element or if the value of the
   &quot;to&quot; element does not identify THIS WS-Routing receiver then generate a
   fault.</li>
   <li>If the &quot;fwd&quot; element is present and contains one or more &quot;via&quot;
   element(s) then remove the top &quot;via&quot; element listed in the &quot;fwd&quot; element
   and verify that the value of that &quot;via&quot; element is either empty or
   identifies THIS WS-Routing receiver.  Failing that generate an appropriate
   WS-Routing fault  If, after removing the top &quot;via&quot;
   element there are no remaining &quot;via&quot; element(s) listed in the &quot;fwd&quot; element,
   and there is no &quot;to&quot; 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 &quot;rev&quot; element is present then add a &quot;via&quot; element as the
   first &quot;via&quot; element listed in the &quot;rev&quot; element with a value indicating the
   reverse path endpoint.  If a reverse path endpoint cannot be provided then
   generate a 751 &quot;Reverse Path Unavailable&quot; WS-Routing fault.</li>
   <li>If one or more &quot;via&quot; element(s) remain in the &quot;fwd&quot; element then
   forward the WS-Routing message to the endpoint identified by the new top
   &quot;via&quot; element listed in the &quot;fwd&quot; element.</li>
   <li>If there are no remaining &quot;via&quot; element(s) listed in the &quot;fwd&quot;
   element but there is a &quot;to&quot; element then forward the WS-Routing message to
   the endpoint identified by the &quot;to&quot; 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 |--&gt;|Intermediary|--&gt;|Intermediary|--&gt;|  WS-Routing |
|  Sender A  |&lt;--|      B     |&lt;--|      C     |&lt;--|  Receiver D |
+------------+   +------------+   +------------+   +-------------+
             HTTP             HTTP              HTTP

</pre>
      </div>

<p>Request from client to intermediary B</p>

<div>
        <pre class="programlisting">
&lt;S:Envelope&gt;
&lt;S:Header&gt;
  &lt;m:path
     xmlns:m=&quot;http://schemas.xmlsoap.org/rp/&quot;
     S:actor=&quot;http://schemas.xmlsoap.org/soap/actor/next&quot;
     S:mustUnderstand=&quot;1&quot;&gt;
   &lt;m:action&gt;http://soapinterop.org/&lt;/m:action&gt;
   &lt;m:to&gt;http://D.com/router&lt;/m:to&gt;
   &lt;m:id&gt;uuid:09233523-345b-4351-b623-5dsf35sgs5d6&lt;/m:id&gt;
   &lt;m:fwd&gt;
    &lt;m:via&gt;http://B.com/router&lt;/m:via&gt;
    &lt;m:via&gt;http://C.com/router&lt;/m:via&gt;
   &lt;/m:fwd&gt;
   &lt;m:rev /&gt;
  &lt;/m:path&gt;
&lt;/S:Header&gt;
&lt;S:Body&gt;
...
&lt;/S:Body&gt;
&lt;/S:Envelope&gt;
</pre>
      </div>

<p>Request from intermediary B to intermediary C</p>

<div>
        <pre class="programlisting">
&lt;n0:Envelope&gt;
&lt;n0:Header&gt;
  &lt;n2:path
     xmlns:n2=&quot;http://schemas.xmlsoap.org/rp/&quot;
     n0:actor=&quot;http://schemas.xmlsoap.org/soap/actor/next&quot;
     n0:mustUnderstand=&quot;1&quot;&gt;
   &lt;n2:action&gt;http://soapinterop.org/&lt;/n2:action&gt;
   &lt;n2:to&gt;http://D.com/router&lt;/n2:to&gt;
   &lt;n2:id&gt;uuid:09233523-345b-4351-b623-5dsf35sgs5d6&lt;/n2:id&gt;
   &lt;n2:fwd&gt;
     &lt;n2:via&gt;http://C.com/router&lt;/n2:via&gt;
   &lt;/n2:fwd&gt;
   &lt;n2:rev&gt;
     &lt;n2:via /&gt;
   &lt;/n2:rev&gt;
  &lt;/n2:path&gt;
&lt;/n0:Header&gt;
&lt;n0:Body&gt;
...
&lt;/n0:Body&gt;
&lt;/n0:Envelope&gt;
</pre>
      </div>

<p>Request from intermediary C to endpoint D</p>

<div>
        <pre class="programlisting">
&lt;n0:Envelope&gt;
  &lt;n0:Header&gt;
    &lt;n2:path
      xmlns:n2=&quot;http://schemas.xmlsoap.org/rp/&quot;
      n0:actor=&quot;http://schemas.xmlsoap.org/soap/actor/next&quot;
      n0:mustUnderstand=&quot;1&quot;&gt;
     &lt;n2:action&gt;http://soapinterop.org/&lt;/n2:action&gt;
     &lt;n2:to&gt;http://D.com/router&lt;/n2:to&gt;
     &lt;n2:id&gt;uuid:09233523-345b-4351-b623-5dsf35sgs5d6&lt;/n2:id&gt;
     &lt;n2:fwd /&gt;
     &lt;n2:rev&gt;
      &lt;n2:via /&gt;
      &lt;n2:via /&gt;
     &lt;/n2:rev&gt;
   &lt;/n2:path&gt;
&lt;/n0:Header&gt;
&lt;n0:Body&gt;
...
&lt;/n0:Body&gt;
&lt;/n0:Envelope&gt;
</pre>
      </div>

<p>Response from endpoint to C</p>

<div>
        <pre class="programlisting">
&lt;n0:Envelope&gt;
&lt;n0:Header&gt;
  &lt;n2:path xmlns:n2=&quot;http://schemas.xmlsoap.org/rp/&quot;
          n0:actor=&quot;http://schemas.xmlsoap.org/soap/actor/next&quot;
  	  n0:mustUnderstand=&quot;1&quot;&gt;
        &lt;n2:action&gt;http://soapinterop.org/&lt;/n2:action&gt;
        &lt;n2:id&gt;uuid:2b2d09ec-a93a-11d6-be21-c9f55c969fe7&lt;/n2:id&gt;
        &lt;n2:relatesTo&gt;uuid:09233523-345b-4351-b623-5dsf35sgs5d6&lt;/n2:relatesTo&gt;
        &lt;n2:fwd&gt;
          &lt;n2:via /&gt;
          &lt;n2:via /&gt;
        &lt;/n2:fwd&gt;
        &lt;n2:rev&gt;
           &lt;n2:via&gt;http://D.com/router&lt;/n2:via&gt;
        &lt;/n2:rev&gt;
        &lt;n2:from /&gt;
  &lt;/n2:path&gt;
&lt;/n0:Header&gt;
&lt;n0:Body&gt;
...
&lt;/n0:Body&gt;
&lt;/n0:Envelope&gt;
</pre>
      </div>

<p>Response from intermediary C to B</p>

<div>
        <pre class="programlisting">
&lt;n0:Envelope&gt;
 &lt;n0:Header&gt;
    &lt;n2:path xmlns:n2=&quot;http://schemas.xmlsoap.org/rp/&quot;
             n0:actor=&quot;http://schemas.xmlsoap.org/soap/actor/next&quot;
	     n0:mustUnderstand=&quot;1&quot;&gt;
        &lt;n2:action&gt;http://soapinterop.org/&lt;/n2:action&gt;
        &lt;n2:id&gt;uuid:2b2d09ec-a93a-11d6-be21-c9f55c969fe7&lt;/n2:id&gt;
        &lt;n2:relatesTo&gt;uuid:09233523-345b-4351-b623-5dsf35sgs5d6&lt;/n2:relatesTo&gt;
        &lt;n2:fwd&gt;
          &lt;n2:via /&gt;
        &lt;/n2:fwd&gt;
        &lt;n2:rev&gt;
          &lt;n2:via&gt;http://C.com/router&lt;/n2:via&gt;
          &lt;n2:via&gt;http://D.com/router&lt;/n2:via&gt;
        &lt;/n2:rev&gt;
        &lt;n2:from /&gt;
     &lt;/n2:path&gt;
&lt;/n0:Header&gt;
&lt;n0:Body&gt;
...
&lt;/n0:Body&gt;
&lt;/n0:Envelope&gt;
</pre>
      </div>

<p>Response from intermediary B to client</p>

<div>
        <pre class="programlisting">
&lt;n0:Envelope&gt;
&lt;n0:Header&gt;
    &lt;n2:path xmlns:n2=&quot;http://schemas.xmlsoap.org/rp/&quot;
             n0:actor=&quot;http://schemas.xmlsoap.org/soap/actor/next&quot;
	     n0:mustUnderstand=&quot;1&quot;&gt;
           &lt;n2:action&gt;http://soapinterop.org/&lt;/n2:action&gt;
           &lt;n2:id&gt;uuid:2b2d09ec-a93a-11d6-be21-c9f55c969fe7&lt;/n2:id&gt;
           &lt;n2:relatesTo&gt;uuid:09233523-345b-4351-b623-5dsf35sgs5d6&lt;/n2:relatesTo&gt;
              &lt;n2:fwd /&gt;
           &lt;n2:rev&gt;
              &lt;n2:via&gt;http://B.com/router&lt;/n2:via&gt;
              &lt;n2:via&gt;http://C.com/router&lt;/n2:via&gt;
              &lt;n2:via&gt;http://D.com/router&lt;/n2:via&gt;
           &lt;/n2:rev&gt;
           &lt;n2:from /&gt;
      &lt;/n2:path&gt;
&lt;/n0:Header&gt;
&lt;n0:Body&gt;
...
&lt;/n0:Body&gt;
&lt;/n0:Envelope&gt;
</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>