Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Using Web Service Explorer to test a Web service"

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 /><font class="indexsub">Using Web Service Explorer to test a Web service</font>
 +
| width="40%" |
 +
[[Image:wtplogosmall.jpg]]
 +
|}
  
<table border="0" cellpadding="2" cellspacing="5" width="100%">
+
{| width="100%" cellspacing="5" cellpadding="2"
  <tr>
+
| valign="top" | '''By Kathy Chan'''<br /> December 22, 2005 <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 1.0 driver'''.
</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;jsessionid=0G-Gfc2ErUGlADxkgZE84pcE(QHyMHiRM)?key=uuid:889A05A5-5C03-AD9B-D456-0E54A527EDEE Delayed Stock Quote ]" 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">&nbsp;</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>
+
|-
&nbsp;</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.gif]]<br />
    <td align="right" valign="top">&nbsp;</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://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl </tt>, then click on '''Go''' . Result: <br />[[Image:wse_stockquote.JPG]]
&nbsp;</td>
+
# Under '''Operations''' in the right hand pane, click on '''getQuote'''. Result: <br />[[Image:wse_getquote.JPG]]
  </tr>
+
# In the '''symbol String''' entry field, enter <tt>ibm</tt>, then click on '''Go''' . In the '''Status''' pane, you should see an answer like this: <br />'''return (float): 79.28'''You may need to move the horizontal bar separating the '''Actions''' and '''Status''' panes upwards a bit to get a better view. Result:<br />[[Image:wse_stockprice.JPG]]
  <tr>
+
|-
    <td align="right" valign="top">&nbsp;</td>
+
| colspan="2" bgcolor="#0080c0" align="left" valign="top" | ''' <font color="#ffffff" face="Arial,Helvetica">Explanation</font>'''
    <td 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  
+
| valign="top" | <br />
    Project using a <b>WTP 1.0 driver</b>. </td>
+
|-
  </tr>
+
| 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.
  <tr>
+
|-
    <td align="right" valign="top">&nbsp;</td>
+
| valign="top" | The Web Services Explorer provides three key services to the user:
    <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  
+
| valign="top" |
    Web Services Explorer to invoke operations on a Web service named &quot;
+
# Comprehensive support for discovering Web services in WS-Inspection 1.0 documents, and in UDDI v2 or v3 registries using the UDDI v2 protocol.
    <a href="http://www.xmethods.net/ve2/ViewListing.po;jsessionid=0G-Gfc2ErUGlADxkgZE84pcE(QHyMHiRM)?key=uuid:889A05A5-5C03-AD9B-D456-0E54A527EDEE">
+
# Comprehensive support for publishing Web services to UDDI v2 or v3 registries using the UDDI v2 protocol.
    Delayed Stock Quote </a>&quot; as available from
+
# Comprehensive support for browsing and invoking Web services natively via their WSDL and XSD.
    <a href="http://www.xmethods.net/">XMethods</a> on the internet. </td>
+
|-
  </tr>
+
| valign="top" |
  <tr>
+
[[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
    <td align="right" valign="top">&nbsp;</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 -&gt; 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">&nbsp;</td>
+
    <td valign="top"><br>
+
&nbsp;</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">&nbsp;</td>
+
    <td valign="top"><br>
+
&nbsp;</td>
+
  </tr>
+
  <tr>
+
    <td align="right" valign="top">&nbsp;</td>
+
    <td valign="top">
+
    <ol>
+
      <li>Launch the Eclipse WTP workbench.</li>
+
      <li>From the main menu bar, select <b>Run -&gt; 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>
+
&nbsp;</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">&nbsp;</td>
+
    <td valign="top"><br>
+
&nbsp;</td>
+
  </tr>
+
  <tr>
+
    <td align="right" valign="top">&nbsp;</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">&nbsp;</td>
+
    <td valign="top">The Web Services Explorer provides three key services to  
+
    the user: </td>
+
  </tr>
+
  <tr>
+
    <td align="right" valign="top">&nbsp;</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">&nbsp;</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>
+

Revision as of 23:00, 29 January 2008

Using Web Service Explorer to test a Web service
Using Web Service Explorer to test a Web service

File:Wtplogosmall.jpg

By Kathy Chan
December 22, 2005

Introduction

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 1.0 driver.

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 " Delayed Stock Quote " as available from XMethods on the internet.

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.

Using the Web Services Explorer to test a Web service

  1. Launch the Eclipse WTP workbench.
  2. 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.
  3. After the Web Browser view opens, maximize it. Result:
    Wse uddi.JPG
  4. In the Web Service Explorer's toolbar (top-right), click on the WSDL Page icon,
    File:Wsdl.gif
  5. Click on the Wsdl main.gif WSDL Main icon. Result:
    Wse wsdl.JPG
  6. In the WSDL URL field, enter the URL http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl , then click on Go . Result:
    File:Wse stockquote.JPG
  7. Under Operations in the right hand pane, click on getQuote. Result:
    File:Wse getquote.JPG
  8. In the symbol String entry field, enter ibm, then click on Go . In the Status pane, you should see an answer like this:
    return (float): 79.28You may need to move the horizontal bar separating the Actions and Status panes upwards a bit to get a better view. Result:
    File:Wse stockprice.JPG
Explanation

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.
The Web Services Explorer provides three key services to the user:
  1. Comprehensive support for discovering Web services in WS-Inspection 1.0 documents, and in UDDI v2 or v3 registries using the UDDI v2 protocol.
  2. Comprehensive support for publishing Web services to UDDI v2 or v3 registries using the UDDI v2 protocol.
  3. Comprehensive support for browsing and invoking Web services natively via their WSDL and XSD.

Note:
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

Back to the top