Generating missing classes and running the client

The web service client project is generated with errors because a number of classes are missing. You can generate the missing classes for the web service client project.

Before you begin

Make sure that you have installed the web service and made the classes and resources available to JAX-WS RI, see Deploying the application and RuleApps using Ant.

About this task

This task shows you how to generate the missing classes using the build.xml file in the new project. These classes must be generated with JAX-WS when the web service is installed. The WSDL is used to generate the missing files.

Note:

The generated build.xml uses the class paths defined in <InstallDir>/executionserver/lib/classpath-executionserver.xml to call the correct libraries.

Procedure

To generate the missing classes using the build.xml file:

  1. Open the WSDL file in a browser.

    The web service is available on the application server at: http://<host>:<port>/<ContextRoot>/<WebServiceProjectName>?wsdl, where <ContextRoot> is jaxws-<RuleAppName>.

    For example, http://localhost:<PORT>/jaxws-loanruleApp/loanvalidation?wsdl

    Note:

    In the build.properties file, make sure that the host and port number in the client WSDL URL are correct.

  2. Run the Ant target generate-client to generate the client classes from the WSDL file.

    Rule Designer generates the classes in the build/src folder.

  3. Run the Ant target compile to compile the generated classes and the client .java file.
  4. Run the Ant target run to execute the client.

    You can also use the provided Eclipse launch configuration to run the client.