Generating missing classes and running the client

The client project for web services generates with errors when some classes are missing. In this case, you can generate those missing classes.

Before you begin

Make sure that you have installed the web service and made the classes and resources available to the reference implementation of Java extension for web services (JAX-WS RI) as explained in Deploying web services and RuleApps by using Ant.

About this task

You can generate the classes that are missing to the project by using the build.xml file in the new project. You must use JAX-WS when the web service is installed. The Web Service Description Language (WSDL) code is used to generate the missing files. To call the appropriate libraries, the generated build.xml file uses the class paths that are defined in <InstallDir>/executionserver/lib/classpath-executionserver.xml directory.

Procedure

  1. Open the WSDL file in a browser.

    The web service is available on the application server at http://<host>:<port>/<ContextRoot>/<WebServiceProjectName>?wsdl. The <ContextRoot> placeholder represents a RuleApp name in the form jaxws-<RuleAppName>.

    For example, http://localhost:9080/jaxws-loanruleApp/loanvalidation?wsdl

  2. In the build.properties file, make sure that the host and port number in the client WSDL URL are correct.
  3. Run the generate-client Ant command to generate the client classes from the WSDL file. Rule Designer generates the classes in the build/src folder.
  4. Run the compile Ant command to compile the generated classes and the client .java file.
  5. Run the run Ant command to execute the client.

    To run the client, you can also use the provided Eclipse launch configuration.