Previous Topic: Generate the WSDL FileNext Topic: Use Java Stubs to Call Web Services


Generate Java Stubs

Generating Java stubs for each web service is required when you call web services with a Java client.

To generate Java stubs for a web service

  1. Verify that you are using the Axis WSDL2Java tool for generating the Java stubs.

    Doing so enables you to invoke the web service methods from your Java program.

    Note: You can obtain the Axis tools from the Apache Axis website (apache.org).

  2. Open a command prompt and enter the command to generate Java stubs. Use the following command as a model.
    java org.apache.axis.wsdl.WSDL2Java -o . -ptesting.soap AccountService.wsdl
    

    This action generates the following files in the package named testing\soap.

  3. Verify that the command generated files like the ones listed in the previous step.

You have generated Java stubs.