Web Service without Data binding
This example shows how to pass XML without data binding.
Steps involved in writing this example:
- Write backend java class for the web service -
HelloWorldService.java
- Write value type to hold the xml string -
XmlString.java
- Write codec to convert XmlString -
XmlStringCodec.java
- Write web-services.xml DD file for the service. This file should
have the schema for the XmlString and the type-mapping to map the
schema types to XmlString
web-services.xml
- Write ant build file to compile and build the service.
build.xml
- compile HelloWorldService.java, XmlString.java and
XmlStringCodec.java to output/WEB-INF/classes
- copy the DD file in output/WEB-INF/ directory
- jar up the output dir as a ear file
- run clientgen on the ear file to generate the client stub
- compile the client side code
Main.java and
- deploy the applicaiton by copying the ear file into the
applications directory of the server
- Follow the instructions here
to build, run and test the service.