<!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="expwsmodules.html" title="Exposing Persistent Stored Modules as Web Services" /> <link rel="next" href="bpel.html" title="BPEL Reference" /> <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="vsmx" /> <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="expwsmodules.html" title="Exposing Persistent Stored Modules as Web Services">Prev</a> | <a class="link" href="bpel.html" title="BPEL Reference">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> <a href="ws-routing.html">Web Services Routing Protocol (WS-Routing)</a> </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 class="selected"> <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="vsmx" /> <h2>15.14. Testing Web Published Web Services</h2> <p>Virtuoso provides a mechanism for testing SOAP messages instantly. This mechanism is the Virtuoso Service Module for XML (VSMX) - an automatically generated test page for published web services. The VSMX file is generated at the same time the WSDL file is generated. A VSMX file is a SOAP operations test page generated based on the descriptions of a WSDL file. The VSMX file has the extension .vsmx, as opposed to the .wsdl extension of the WSDL file, and can be accessed similarly.</p> <p>VSMX pages give instant access to published SOAP services for testing. Any newly created service will need testing which normally means writing more code to call the service, supply parameters, retrieve the result, display the results in some manor, etc. The VSMX feature of Virtuoso eliminates this otherwise repetitive process by automatically maintaining a test page for SOAP messages: the VSMX file. This greatly speeds up the development and testing cycle. The beauty of this is that this is automated, even Microsoft's ASMX file requires that you code the services descriptions before seeing the results.</p> <p>Web Service developers would use VSMX to forego the test bed creation step in light of automatic test page generation. Project managers can easily keep track of their developers progress by checking the test page periodically.</p> <p>Since WSDL descriptions by themselves are not very pleasing to the human eye, the VSMX test page can be used to preview services available on a Virtuoso server, or from a remote source using <a href="wsdl.html#importwsdl">SOAP/WSDL Proxying</a>. Even experienced developers will find these easier to read than WSDL files.</p> <p>Each SOAP enabled virtual directory will have a WSDL and VSMX file available. The VSMX file is a test page for the SOAP operations. This test page can be found as simply as the WSDL can be found. From the WSDL chapter we have seen that for every SOAP enabled virtual directory you automatically get the file:</p> <div> <pre class="programlisting">http://[host:port]/[SOAP Virtual Directory]/services.wsdl</pre> </div> <p>likewise you also get:</p> <div> <pre class="programlisting">http://[host:port]/[SOAP Virtual Directory]/services.vsmx</pre> </div> <p>You simply point your web browser to this file for the test page. The demo database contains samples that can be found as:</p> <div> <pre class="programlisting">http://[host:port]/SOAP/services.vsmx</pre> </div> <table class="figure" border="0" cellpadding="0" cellspacing="0"> <tr> <td> <img alt="VSMX Test Page" src="../images/ui/vsmx001.png" /> </td> </tr> <tr> <td>Figure: 15.14.1. VSMX Test Page</td> </tr> </table> <p>The page shows all the operations that are available. Click on the link that corresponds to the operation to test and the services details and test facilities will also appear, allowing you to supply input parameters making the SOAP call.</p> <p>Once executed the result of SOAP call will be rendered using the Virtuoso XSLT processor and built-in style sheet, and appended to bottom of the services details. </p> <p>In addition to the simple types: numbers and strings, more complex types such as arrays and structures can be specified as input parameters. For an array, each value must be specified on a separate row in the input text field. For structures the names of structure members will be displayed, following by the equals sign, the values of the structures members can then be input after the equals sign. Arrays of arrays or structures of arrays cannot be used on the test page.</p> <p>The first comment line of a stored procedure in the format:</p> <div> <pre class="programlisting">--## [comment]</pre> </div> <p>will be included in the WSDL description of the SOAP message for that procedure when generating the WSDL file.</p> <table border="0" width="90%" id="navbarbottom"> <tr> <td align="left" width="33%"> <a href="expwsmodules.html" title="Exposing Persistent Stored Modules as Web Services">Previous</a> <br />Exposing Persistent Stored Modules as Web Services</td> <td align="center" width="34%"> <a href="webservices.html">Chapter Contents</a> </td> <td align="right" width="33%"> <a href="bpel.html" title="BPEL Reference">Next</a> <br />BPEL Reference</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>