Top down Java Web Service - Axis

Run wsgen.xml as an Ant build file inside the Eclipse workbench to generate a Java web service top down from an input WSDL file.

Instructions:

  1. Start WTP.
  2. Create a dynamic web project called testProject with an Apache Tomcat target server. File > New > Web > Dynamic Web Project .
  3. Import the AreaService.wsdl
  4. file into the WebContent folder of the testProject.
  5. Go to the AntTest folder created in Test 1. Open and edit the wsgen.xml Ant script so that property file="axisservice.properties".
  6. Save the wsgen.xml file.
  7. Edit the axisservice.properties file. Check that scenarioType=service and InitialSelection=/testProject/WebContent/AreaService.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: 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.
  8. Save the axisservice.properties file.
  9. Right click on the wsgen.xml file and select Run As > Ant Build...
  10. In the Ant dialog click on the JRE tab and choose the radio button Run in the same JRE as the workspace. Click Apply and then Run.
  11. Watch the console for output. Look for a BUILD SUCCESSFUL message with no exceptions.
  12. Check to see that AreaServiceSOAP.wsdl was created in the project's WebContent\wsdl folder as well as the Java code in the src folder for the testProject web project in the org.tempuri.AreaService package - Also verify that the deployment descriptors were generated in the WebContent\WEB-INF\org\tempuri\AreaService folder: