Consuming Web service using Web Service Client
Consuming Web service using Web Service Client
 

By Kathy Chan
September 19, 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 with the WTP 1.0 M8 drivers.

 

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

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


  5. Click Next.


  6. Click Next and accept the defaults on the Web Service Selection Page.
  7. On the Client Environment Configuration page, type in AreaProjectClient as the name of the Client project and areaClient as the Client module.
    If you want to choose a server different from the one defaulted by the wizard, click the Edit button to: select a server.

  8. Click Finish.
  9. 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.
  10. Under Methods, click on calculateRectArea .
  11. Under Inputs, enter 2.0 and 5.0 into the height and width entry field.
  12. Click on Invoke. In the Result view, you should get a response of 10.0.