Web Service Client Tutorial
Web Service Client Tutorial
WTP LogoWTP Home
 

By Kathy Chan
Feb 25, 2005

Introduction
 
 

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.

 

This tutorial shows how to create a Web serivce client to a deployed Web service created in Creating top down Web service .

 
Getting Started
 
 

Follow the instruction at Getting Started with Web Service before proceeding with the tutorial.

 
Create a Web service Client
 
  1. Select the AreaServiceSOAP.wsdl file in AreaProject\WebContent\wsdl created in Creating top down Web service .
    Do not select the AreaService.wsdl file in AreaProject\WebContent.
  2. Open File -> New -> Other... -> Web Services -> Web Service Client.
  3. Select Test the Web service and Overwrite files without warning .

  4. Click Next.

  5. Type in AreaProjectClient as the name of the Client project.
    If you want to choose a server different from the one defaulted by the wizard, click the Edit button to: select a server .

  6. Click Finish .
  7. .
  8. 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.
  9. Under Methods , click on calculateRectArea .

  10. Under Inputs , enter 2.0 and 5.0 into the height and width entry field.
  11. Click on Invoke . In the Result view, you should get a response of 10.0 .