Generate Java Client - Axis

Run wsant.bat which invokes the wsgen.xml Ant file to generates a Java proxy from input .wsdl.

Instructions:

  1. Start WTP. Ensure that there is a Converter.wsdl in the WebContent\wsdl folder as output from the previous task.
  2. Check the Servers view and make sure that the server is stopped. This test case will ensure that the Ant task is able to start the server if it is not already running.
  3. Exit the workbench.
  4. Navigate to the plugins directory of the wtp installation. Change to the org.eclipse.wst.command.env plugin and go to the ant folder. For example: D:\wtp1110\eclipse\plugins\org.eclipse.wst.command.env_1.0.0\ant
  5. The following files should exist there:
  6. Open the wsgen.xml Ant file and edit so that property file="axisclient.properties".
  7. Save the wsgen.xml file.
  8. Edit the axisclient.properties file. Check that scenarioType=client and InitialSelection=/testProject/WebContent/wsdl/Converter.wsdl. If your default server and runtime are set in the preferences as Tomcat and Axis you can safely remove all other properties from the file. Otherwise, set: Client.RuntimeId=org.eclipse.jst.ws.axis.creation.axisWebServiceRT and Client.ServerId=org.eclipse.jst.server.tomcat.50 and remove the remaining properties. Defaults will be used for unset properties.
  9. Save the axisclient.properties file.
  10. Edit the wsant.bat file. Set the local environment variables to reflect your system configuration inluding the location of your JRE, the Eclipse startup.jar and the workspace containing the web project and Converter.wsdl file. You may have already done this in the previous task
  11. Run wsant.bat
  12. Look at the wsgen.txt file for output. Look for a BUILD SUCCESSFUL message and no exceptions.
  13. At the command line or back in wtp navigate to the workspace to find the client ConverterProxy.java code
  14. Test the web service client using the Web Services Explorer.