blob: fcb58ac163d032c0f2e5d0221192db801c665ac0 [file] [log] [blame]
<?xml-stylesheet type="text/xsl" href="../../../../../wtp.xsl"?>
<html>
<head>
<meta name="root" content="../../../../../../" />
<title>Web Service Client Supporting Flexible Projects</title>
</head>
<body>
<h1>Web Service Client Supporting Flexible Projects</h1>
<p>
<b>By Kathy Chan</b>
<br />
Aug 4, 2005
<br />
<br />
</p>
<h2>Introduction</h2>
<br></br>
<p>
This document is one of a series of tutorials to
demonstrate the use of the Web Services tools in the Web
Tools Platform Project with the <b>M5 drivers</b>.
</p>
<p>
This tutorial shows how to create a Web serivce client to a
deployed Web service created in
<a href="TopDownWebService.html">
Creating a top down Web service
</a>.
</p>
<br />
<h2>Create a Web service Client</h2>
<ol>
<li>
Select the <b>AreaServiceSOAP.wsdl</b> file in the
<b>AreaProject\area\WebContent\wsdl</b> folder created in
<a href="TopDownWebService.html">
Creating a top down Web service
</a> tutorial.
<br/><b>Do not</b> select the AreaService.wsdl
file in AreaProject\area\WebContent.
</li>
<li>
Open <b>File -&gt; New -&gt; Other... -&gt; Web Services -&gt; Web
Service Client</b>.
</li>
<li>Click <b>Next</b>.</li>
<li>
Select
<b>Test the Web service</b>
and
<b>Overwrite files without warning</b>.
</li>
<br/>
<img border="0"
SRC="resources/client1.JPG" />
<br/>
<li>Click <b>Next</b>.</li>
<br/>
<img border="0"
SRC="resources/client2.JPG" />
<br/>
<li>
Click <b>Next</b> and accept the defaults on the <b>Web Service Selection Page</b>.
</li>
<li>
On the <b>Client Environment Configuration</b> page, type in
<b>AreaProjectClient</b>
as the name of the Client project and <b>areaClient</b> as the Client module.
<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/client3.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 project 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>
<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 <b>Result</b> view, you should get a response of
<b>10.0</b>.
</li>
<br></br>
<img border="0"
SRC="resources/client4.JPG" />
</ol>
</body>
</html>