Bottom up Java Web Service - Axis

Run wsant.bat which invokes the wsgen.xml Ant file and generates a Java web service bottom up from input Java source.

Instructions:

  1. Start WTP.
  2. Create a dynamic web project called buProject with an Apache Tomcat target server. File > New > Web > Dynamic Web Project.
  3. Import wtp.Converter to the src folder of buProject. Converter.zip
  4. Check the Servers view and make sure that the server is started.
  5. Exit the workbench.
  6. Navigate to the plugins directory of your 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
  7. The following files should exist there:
  8. Open and edit the wsgen.xml Ant script so that property file="axisservice.properties"
  9. Save the wsgen.xml file.
  10. Edit the axisservice.properties file. Check that scenarioType=service and InitialSelection=/buProject/src/wtp/Converter.java. 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: Service.RuntimeId=org.eclipse.jst.ws.axis.creation.axisWebServiceRT and Service.ServerId=org.eclipse.jst.server.tomcat.50 and remove the remaining properties. Defaults will be used for unset properties.
  11. Save the axisservice.properties file.
  12. 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.java file.
  13. Run wsant.bat.
  14. Look at the wsgen.txt file for output. Look for a BUILD SUCCESSFUL message and no exceptions.
  15. At the command line or back in WTP, navigate to the workspace to check the contents of the Java source folder and the WebContent\wsdl folder in the buProject. Check to see that Converter.wsdl was created. Also verify that the deployment descriptors were generated in the WEB-INF\ConverterService\WTP folder:
  16. Test the web service using the Web Services Explorer.