Template Build File for Web Service Clients

You can use the <JWSDP_HOME>/jwsdp-shared/bin/webserviceclient.xml template build file to help you build your web service client.

This document explains how to use this Ant build file with various targets to help you build and set up the classpath for your web service client.

Note: You must have performed a "Typical" installation of Java WSDP (installed all of the components) if you want to use the installation for integration with the Sun JavaTM System Application Server Platform Edition 8.1 2005Q2 Update 2. If you performed a "Custom" installation, not all of the required JAR files were installed. If the webserviceclient.xml buildfile cannot locate these JAR files, it may not execute properly.

To execute these instructions, first change to the <JWSDP_HOME>/jwsdp-shared/bindirectory.

Setting Up Your Web Service Client Application to Use Java WSDP 1.6 Components

To set up the classpath environment to build and run your web service client, modify the following properties in the <JWSDP_HOME>/jwsdp-shared/bin/webserviceclient.props file:

Note: You can perform this step for every web service client you write, or you can place a global webserviceclient.propsfile in your home directory for all web service clients.

Using the Template File

  1. Copy the webserviceclient.xml and client-config.xml files from <JWSDP_HOME>/jwsdp-shared/binto the top-level directory of your client code. Copy the webserviceclient.props file either to the same directory or to your home directory.

  2. Edit the webserviceclient.props file and fill in the values described in the preceding section.

  3. Edit the file client-config.xml, which is defined as configfile in webserviceclient.props. This XML file contains the information needed by the JAX-RPC wscompile tool. Specify the location of the WSDL definition file and the package name to be used for the class files that are generated from the WSDL for the client.

  4. Run Ant, passing it the webserviceclient.xml file as input. Use the following command:

    ant -f webserviceclient.xml

    Thedefault target for the build file is dist. This target creates the clientdistribution JAR file in the dist.dir directory defined in webserviceclient.props.


Please send feedback on the Java Web Services Developer Pack to users@jwsdp.dev.java.net.

Copyright © 2005 Sun Microsystems, Inc. All rights reserved.