Start from schema
This example shows how to author web service, starting from schema.
Steps involved in writing this example:
- Write schema for the value types used by the web service -
World.xsd
- Use autotype ant task to generate value types and types.xml
file from the schema.
- Write backend java class for the web service, this class can use
types generated in the step above -
HelloWorldService.java
- Write ant build file to compile and build the service.
build.xml
- compile HelloWorldService.java to output/WEB-INF/classes
- run autotype to generate the codecs for other non build
in types. This auto type will merge the type mapping available
in the first types.xml file
- run source2wsdd to generate web-services.xml deployment
file and WSL file
- put the DD file in output/WEB-INF/ directory
- run clientgen on the WSDL file to generate the client jar
- jar up output directory as a war file
- compile the client side code
Main.java and
- deploy the applicaiton by copying the war file into the
applications directory of the server
- Follow the instructions here
to build, run and test the service.