IV Axis client implementation
Build a full web service with Axis
Client code generation
To generate the java code for the axis client from the definition.wsdl file :
- Create a new Dynamic Web Project called AxisTutorialClient
- Right-click on the definition.wsdl file in the Eclipse Project Explorer view
- Choose : Web Services > Generate Client
Choose Install service in the top left spinner, and select :
- the target Server (Tomcat)
- the target Web service runtime (Axis)
- the Service project (AxisTutorialClient)
Click the Next button and select the custom mapping option :
Select a target package for types in the namespace http://axis.tutorial/AxisTutorial :
Click the Finish button. The client sources are generated under the axis.tutorial package of the AxisTutorialClient Project :
Client implementation
To call the service, you just have to get a new AxisTutorialProxy instance and call it's getById function :
Download the example index.jsp page to test your brand new web service. Copy it into the /WebContent folder of the AxisTutorialClient project. Start Tomcat and open the URL http://localhost:8080/AxisTutorialClient/.