Step 4 - Generate Java Stubs

Generating Java stubs for each web service is required when you call web services with a Java client.
casm171
Generating Java stubs for each web service is required when you call web services with a Java client.
Follow these steps:
  1. Verify that you are using the Axis WSDL2Java tool for generating the Java stubs.
    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:
    • web_service_name
      Impl.java
      This new interface file contains the appropriate java.rmi.Remote usages.
    • web_service_name
      ImplService.java
      This file is the Service Interface of the web service. The Service Locator implements this interface.
    • web_service_name
      ImplServiceLocator.java
      This file is the Helper factory to retrieve a handle to the service.
    • web_service_name
      SoapBindingStub.java
      This file is the client-side stub code that encapsulates the client access.
    • Serialized beans
      These beans function as input and return types. They also catch exceptions.
  3. Verify that the command generated files like the ones in the previous step.