|
|
(14 intermediate revisions by 2 users not shown) |
Line 1: |
Line 1: |
| + | {| width="100%" cellspacing="5" cellpadding="2" |
| + | | width="60%" align="left" | <font class="indextop">Using Web Service Explorer to test a Web service</font><br /> |
| + | | width="40%" | |
| + | [[Image:Wtplogosmall.png]] |
| + | |} |
| | | |
− | <table border="0" cellpadding="2" cellspacing="5" width="100%">
| + | {| width="100%" cellspacing="5" cellpadding="2" |
− | <tr>
| + | | valign="top" | '''By Kathy Chan'''<br /> June 23, 2008 <br /><br /> |
− | <td align="left" width="60%"><font class="indextop">Using Web Service
| + | |- |
− | Explorer to test a Web service</font> <br>
| + | | colspan="2" bgcolor="#0080c0" align="left" valign="top" | ''' <font color="#ffffff" face="Arial,Helvetica">Introduction</font>''' |
− | <font class="indexsub">Using Web Service Explorer to test a Web service</font></td>
| + | |- |
− | <td width="40%">
| + | | valign="top" | <br /> |
− | <img src="http://www.eclipse.org//webtools/images/wtplogosmall.jpg" align="middle" height="129" hspace="50" width="207"></td>
| + | |- |
− | </tr>
| + | | valign="top" | This document is one of a series of tutorials to demonstrate the use of the Web Services tools in the Web Tools Platform Project using a WTP drivers (it works with WTP 1.5.x, WTP 2.0.x, 3.0.x, and WTP 3.2). |
− | </table>
| + | |- |
− | <table border="0" cellpadding="2" cellspacing="5" width="100%">
| + | | valign="top" | |
− | <colgroup>
| + | This tutorial shows how to use the Web Service Explorer to test a Web service via native WSDL and SOAP. It demonstrates how to use the Web Services Explorer to invoke operations on a Web service named " [http://www.xmethods.net/ve2/ViewListing.po?key=uuid:BF3EFCDD-FCD4-8867-3AAC-068985E7CB89 Romulan Numbers XLII ]" as available from [http://www.xmethods.net/ XMethods] on the internet. |
− | <col width="16"><col width="1*">
| + | |- |
− | </colgroup>
| + | | valign="top" | The only prerequisite is that you be connected to the internet. If you are connected via a firewall, you can use the Internet preferences page (choose '''Preferences -> Internet''' from the main menu). Otherwise, you can begin with a completely fresh workspace and no installed servers. |
− | <tr>
| + | |- |
− | <td align="right" valign="top"> </td>
| + | | valign="top" | <br /> |
− | <td valign="top"><b>By Kathy Chan</b> <br>
| + | |- |
− | December 22, 2005 <br>
| + | | colspan="2" bgcolor="#0080c0" align="left" valign="top" | ''' <font color="#ffffff" face="Arial,Helvetica">Using the Web Services Explorer to test a Web service</font>''' |
− | <br>
| + | |- |
− | </td>
| + | | valign="top" | <br /> |
− | </tr>
| + | |- |
− | <tr>
| + | | valign="top" | |
− | <td colspan="2" align="left" bgcolor="#0080c0" valign="top"><b>
| + | # Launch the Eclipse WTP workbench. |
− | <font color="#ffffff" face="Arial,Helvetica">Introduction</font></b></td>
| + | # From the main menu bar, select '''Run -> Launch the Web Services Explorer'''. This will take a few moments the first time while Eclipse's internal Tomcat server starts up and loads the Web Services Explorer application. |
− | </tr>
| + | # After the Web Browser view opens, maximize it. Result: <br />[[Image:wse_uddi.JPG]] |
− | <tr>
| + | # In the Web Service Explorer's toolbar (top-right), click on the ''' WSDL Page''' icon, <br />[[Image:wsdl.jpg]]<br /> |
− | <td align="right" valign="top"> </td>
| + | # Click on the [[Image:wsdl_main.gif]] '''WSDL Main''' icon. Result: <br />[[Image:wse_wsdl.JPG]] |
− | <td valign="top"><br>
| + | # In the '''WSDL URL''' field, enter the URL <tt>http://www.ebob42.com/cgi-bin/Romulan.exe/wsdl/IRoman </tt>, then click on '''Go''' . Result: <br />[[Image:wse_romanConvert.JPG]] |
− | </td>
| + | # Under '''Operations''' in the right hand pane, click on '''IntToRoman'''. Result: <br />[[Image:wse_romanConvertIntToRoman.JPG]] |
− | </tr>
| + | # In the '''Int int''' entry field, enter <tt>9</tt>, then click on '''Go''' . In the '''Status''' pane, you should see an answer like this: <br />'''return (String) IX |
− | <tr>
| + | |- |
− | <td align="right" valign="top"> </td>
| + | | valign="top" | |
− | <td valign="top">This document is one of a series of tutorials to
| + | [[Image:note.gif|Note: ]]<br /> A key point of the scenario above is that no code was generated and no servers were required in order to invoke operations on the WSDL |
− | demonstrate the use of the Web Services tools in the Web Tools Platform
| + | |} |
− | Project using a <b>WTP 1.0 driver</b>. </td>
| + | |
− | </tr>
| + | |
− | <tr>
| + | |
− | <td align="right" valign="top"> </td>
| + | |
− | <td valign="top">This tutorial shows how to use the Web Service Explorer to
| + | |
− | test a Web service via native WSDL and SOAP. It demonstrates how to use the
| + | |
− | Web Services Explorer to invoke operations on a Web service named "
| + | |
− | <a href="http://www.xmethods.net/ve2/ViewListing.po;jsessionid=0G-Gfc2ErUGlADxkgZE84pcE(QHyMHiRM)?key=uuid:889A05A5-5C03-AD9B-D456-0E54A527EDEE">
| + | |
− | Delayed Stock Quote </a>" as available from
| + | |
− | <a href="http://www.xmethods.net/">XMethods</a> on the internet. </td>
| + | |
− | </tr>
| + | |
− | <tr>
| + | |
− | <td align="right" valign="top"> </td>
| + | |
− | <td valign="top">The only prerequisite is that you be connected to the
| + | |
− | internet. If you are connected via a firewall, you can use the Internet
| + | |
− | preferences page (choose <b>Preferences -> Internet</b> from the main menu).
| + | |
− | Otherwise, you can begin with a completely fresh workspace and no installed
| + | |
− | servers. </td>
| + | |
− | </tr>
| + | |
− | <tr>
| + | |
− | <td align="right" valign="top"> </td>
| + | |
− | <td valign="top"><br>
| + | |
− | </td>
| + | |
− | </tr>
| + | |
− | <tr>
| + | |
− | <td colspan="2" align="left" bgcolor="#0080c0" valign="top"><b>
| + | |
− | <font color="#ffffff" face="Arial,Helvetica">Using the Web Services Explorer
| + | |
− | to test a Web service</font></b></td>
| + | |
− | </tr>
| + | |
− | <tr>
| + | |
− | <td align="right" valign="top"> </td>
| + | |
− | <td valign="top"><br>
| + | |
− | </td>
| + | |
− | </tr>
| + | |
− | <tr>
| + | |
− | <td align="right" valign="top"> </td>
| + | |
− | <td valign="top">
| + | |
− | <ol>
| + | |
− | <li>Launch the Eclipse WTP workbench.</li>
| + | |
− | <li>From the main menu bar, select <b>Run -> Launch the Web Services
| + | |
− | Explorer</b>. This will take a few moments the first time while Eclipse's
| + | |
− | internal Tomcat server starts up and loads the Web Services Explorer
| + | |
− | application. </li>
| + | |
− | <li>After the Web Browser view opens, maximize it. Result: <br>
| + | |
− | <img src="http://www.eclipse.org/webtools/jst/components/ws/1.0/tutorials/WebServiceExplorer/images/wse_uddi.JPG" border="0" width="801" height="665">
| + | |
− | </li>
| + | |
− | <li>In the Web Service Explorer's toolbar (top-right), click on the <b>
| + | |
− | WSDL Page</b> icon, <br>
| + | |
− | <img src="http://www.eclipse.org/webtools/jst/components/ws/1.0/tutorials/WebServiceExplorer/images/wsdl.gif" border="0" width="16" height="16">
| + | |
− | <br>
| + | |
− | </li>
| + | |
− | <li>Click on the
| + | |
− | <img src="http://www.eclipse.org/webtools/jst/components/ws/1.0/tutorials/WebServiceExplorer/images/wsdl_main.gif" border="0" width="16" height="16">
| + | |
− | <b>WSDL Main</b> icon. Result: <br>
| + | |
− | <img src="http://www.eclipse.org/webtools/jst/components/ws/1.0/tutorials/WebServiceExplorer/images/wse_wsdl.JPG" border="0" width="766" height="535">
| + | |
− | </li>
| + | |
− | <li>In the <b>WSDL URL</b> field, enter the URL <tt>http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl
| + | |
− | </tt>, then click on <b>Go</b> . Result: <br>
| + | |
− | <img src="http://www.eclipse.org/webtools/jst/components/ws/1.0/tutorials/WebServiceExplorer/images/wse_stockquote.JPG" border="0" width="818" height="663">
| + | |
− | </li>
| + | |
− | <li>Under <b>Operations</b> in the right hand pane, click on <b>getQuote</b>.
| + | |
− | Result: <br>
| + | |
− | <img src="http://www.eclipse.org/webtools/jst/components/ws/1.0/tutorials/WebServiceExplorer/images/wse_getquote.JPG" border="0" width="818" height="663">
| + | |
− | </li>
| + | |
− | <li>In the <b>symbol String</b> entry field, enter <tt>ibm</tt>, then
| + | |
− | click on <b>Go</b> . In the <b>Status</b> pane, you should see an answer
| + | |
− | like this: <br>
| + | |
− | <b>return (float): 79.28</b>
| + | |
− | <p>You may need to move the horizontal bar separating the <b>Actions</b>
| + | |
− | and <b>Status</b> panes upwards a bit to get a better view. Result: </p>
| + | |
− | <p><br>
| + | |
− | <img src="http://www.eclipse.org/webtools/jst/components/ws/1.0/tutorials/WebServiceExplorer/images/wse_stockprice.JPG" border="0" width="818" height="663">
| + | |
− | </li>
| + | |
− | </ol>
| + | |
− | </td>
| + | |
− | </tr>
| + | |
− | <tr>
| + | |
− | <td colspan="2" align="left" bgcolor="#0080c0" valign="top"><b>
| + | |
− | <font color="#ffffff" face="Arial,Helvetica">Explanation</font></b></td>
| + | |
− | </tr>
| + | |
− | <tr>
| + | |
− | <td align="right" valign="top"> </td>
| + | |
− | <td valign="top"><br>
| + | |
− | </td>
| + | |
− | </tr>
| + | |
− | <tr>
| + | |
− | <td align="right" valign="top"> </td>
| + | |
− | <td valign="top">The Web Services Explorer is a JSP Web application hosted
| + | |
− | on the Apache Tomcat servlet engine contained within Eclipse. It is
| + | |
− | integrated into Eclipse on two levels: visually by virtue of it running in
| + | |
− | the embedded browser, and logically by virtue of it running as a thread in
| + | |
− | the Eclipse JRE. Though not demonstrated in this scenario, this latter type
| + | |
− | of integration allows the Web Services Explorer to access resources in the
| + | |
− | workspace, write resources into the workspace, and launch various Web
| + | |
− | services wizards. </td>
| + | |
− | </tr>
| + | |
− | <tr>
| + | |
− | <td align="right" valign="top"> </td>
| + | |
− | <td valign="top">The Web Services Explorer provides three key services to
| + | |
− | the user: </td>
| + | |
− | </tr>
| + | |
− | <tr>
| + | |
− | <td align="right" valign="top"> </td>
| + | |
− | <td valign="top">
| + | |
− | <ol>
| + | |
− | <li>Comprehensive support for discovering Web services in WS-Inspection
| + | |
− | 1.0 documents, and in UDDI v2 or v3 registries using the UDDI v2 protocol.
| + | |
− | </li>
| + | |
− | <li>Comprehensive support for publishing Web services to UDDI v2 or v3
| + | |
− | registries using the UDDI v2 protocol. </li>
| + | |
− | <li>Comprehensive support for browsing and invoking Web services natively
| + | |
− | via their WSDL and XSD. </li>
| + | |
− | </ol>
| + | |
− | </td>
| + | |
− | </tr>
| + | |
− | <tr>
| + | |
− | <td align="right" valign="top"> </td>
| + | |
− | <td valign="top">
| + | |
− | <img src="http://www.eclipse.org/webtools/jst/components/ws/1.0/tutorials/WebServiceExplorer/images/note.gif" alt="Note: " border="0" width="62" height="13">
| + | |
− | <br>
| + | |
− | A key point of the scenario above is that no code was generated and no
| + | |
− | servers were required in order to invoke operations on the WSDL</td>
| + | |
− | </tr>
| + | |
− | </table>
| + | |