| <?xml version="1.0" encoding="UTF-8"?> |
| <?xml-stylesheet type="text/xsl" href="../../../../../wtp.xsl"?> |
| <html> |
| <head> |
| <meta name="root" content="../../../../../../" /> |
| <title>Web Service Client Tutorial</title> |
| </head> |
| <body> |
| <h1>Web Service Client Tutorial</h1> |
| <p> |
| <b>By Kathy Chan</b> |
| <br /> |
| Feb 25, 2005 |
| <br /> |
| <br /> |
| </p> |
| |
| <h2>Introduction</h2> |
| <br></br> |
| <p> |
| This document is a one of a series of tutorials to |
| demonstrate the use of the Web Services tools in the Web |
| Tools Platform Project. |
| </p> |
| <p> |
| This tutorial shows how to create a Web serivce client to a |
| deployed Web service created in |
| <a href="TopDownWebService.html"> |
| Creating top down Web service |
| </a> |
| . |
| </p> |
| <br /> |
| <h2>Getting Started</h2> |
| <br /> |
| <p> |
| Follow the instruction at |
| <a href="GettingStartedWebService.html"> |
| Getting Started with Web Service |
| </a> |
| before proceeding with the tutorial. |
| </p> |
| <br /> |
| |
| <h2>Create a Web service Client</h2> |
| |
| <ol> |
| <li> |
| Select the AreaServiceSOAP.wsdl file in |
| AreaProject\WebContent\wsdl created in |
| <a href="TopDownWebService.html"> |
| Creating top down Web service |
| </a> |
| . <br/><b>Do not</b> select the AreaService.wsdl |
| file in AreaProject\WebContent. |
| </li> |
| |
| <li> |
| Open File -> New -> Other... -> Web Services -> Web |
| Service Client. |
| </li> |
| |
| <li> |
| Select |
| <b>Test the Web service</b> |
| and |
| <b>Overwrite files without warning</b> |
| . |
| </li> |
| <br></br> |
| |
| <img border="0" |
| SRC="resources/WebServiceClient/image52P.JPG" /> |
| <li>Click Next.</li> |
| |
| <br /> |
| <img border="0" |
| SRC="resources/WebServiceClient/imageGA1.JPG" /> |
| |
| |
| <li> |
| Type in |
| <b>AreaProjectClient</b> |
| as the name of the Client project. |
| <br /> |
| If you want to choose a server different from the one |
| defaulted by the wizard, click the |
| <b>Edit</b> |
| button to: |
| <a href="SelectServer.html">select a server</a> |
| . |
| </li> |
| <br /> |
| <img border="0" |
| SRC="resources/WebServiceClient/imageF9I.JPG" /> |
| |
| <li> |
| Click |
| <b>Finish</b> |
| . |
| </li> |
| . |
| |
| <li> |
| It will take about one minute for the wizard to assemble |
| the Web service client Web projects, start Apache |
| Tomcat, and deploy the projects to Tomcat. Once |
| finished, the generated Sample JSP Web application will |
| appear in the browser view. |
| </li> |
| |
| <li> |
| Under |
| <b>Methods</b> |
| , click on |
| <b>calculateRectArea</b> |
| . |
| </li> |
| <br></br> |
| <img border="0" |
| SRC="resources/WebServiceClient/imageC2R.JPG" /> |
| <li> |
| Under |
| <b>Inputs</b> |
| , enter |
| <tt>2.0</tt> |
| and |
| <tt>5.0</tt> |
| into the height and width entry field. |
| </li> |
| |
| <li> |
| Click on |
| <b>Invoke</b> |
| . In the Result view, you should get a response of |
| <b>10.0</b> |
| . |
| </li> |
| <br></br> |
| <img border="0" |
| SRC="resources/WebServiceClient/image2L9.JPG" /> |
| |
| </ol> |
| </body> |
| </html> |