Working with Web Service Clients

The following table shows how to work with web service clients.
Number 1
Create the web service client
  1. From the Projects window or Files window, right-click a node in the project and choose New > Other. The New File wizard appears. Under Categories, select Web Services. Under File Types, select Web Service Client. Click Next.
  2. Create the web service client proxies/stubs.

For troubleshooting, see Setting a Proxy for Consuming a Web Service.


Number 2
Develop the web service client application
  1. In the Projects window or Files window, double-click the files that you would like to edit.
  2. Use the Source Editor to develop the web service client.
  3. When you right-click in the Source Editor, you can use the IDE to generate skeleton code for calling a web service operation.

Number 3
Build the web service client
  1. Do one of the following:
    • If the module within which the web service client is implemented is part of a J2EE application, make sure the J2EE application is set as the main project and choose Run > Build Main Project (F11).
    • If the project is a stand-alone application, or if you want to build the module without building the other modules in the J2EE application, right-click the project's node in the Projects window and choose Build.
  2. Analyze the result and, if necessary, customize the related tool's features. For a JAX-WS web service that is created from a WSDL file, you can use the Web Service Attributes editor to customize the wsimport tool's features. For a JAX-RPC web service, customize the wscompile tool's features, depending on your needs, as described in Building a Web Service Client.

Number 4
Deploy the web service client

You can deploy a web service client as a stand-alone module or as a part of a J2EE application.

  1. Make sure the server to which you want to deploy is targeted. Right-click a project node, choose Properties and check the Run panel.
  2. Do one of the following:
    • To deploy the client as part of a J2EE application, right-click the J2EE application's J2EE Modules node, choose Add J2EE Module, select the module that contains the web service client, and click OK.
    • To deploy the client as a stand-alone application, choose Run > Run Main Project or right-click the project and choose Run.

For troubleshooting, see Setting a Proxy for Consuming a Web Service.


Legal Notices