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 "Creating a Java Web Service Client"

(New page: {| width="100%" cellspacing="5" cellpadding="2" | width="60%" align="left" | <font class="indextop">Consuming Web service using Web Service Client</font><br /><font class="indexsub">Consum...)
(No difference)

Revision as of 23:07, 29 January 2008

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

File:Wtplogosmall.jpg

By Kathy Chan
June 29, 2006

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.5 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 AreaProj\WebContent\wsdl folder created in Creating a top down Web service tutorial.
    Do not select the AreaService.wsdl file in the AreaProj\WebContent folder.
  2. Open File -> New -> Other... -> Web Services -> Web Service Client.
  3. Click Next.
  4. Move the client slider to the Test Client position.
  5. Click the Client project link under Configuration and type in AreaProjClient as the name of the Client project in the dialog that appears:
    File:CreateClientProj.png
  6. If you want to choose a server different from the one defaulted by the wizard, click the Server link to: select a server.
  7. Result:
    File:ClientWizard.png
  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.
    File:ClientJSP.png

Back to the top