JiBX Data Binding
This sample demonstrates the usage of JiBX data binding that comes with Axis2. JiBX differs from other data binding techniques supported by Axis2 in that it allows you to use your own Java data objects (as opposed to Java data objects generated from a schema definition). JiBX also provides a nicer form of an unwrapped Web services interface than is supported by the other data binding techniques.
On the downside, JiBX requires more setup than the other data binding techniques - in particular, you need to come up with a set of data classes and a binding definition in order to work with JiBX in Axis2.
Building the Service
To build the samples you need Apache Ant build tool.
The steps are as follows:
1. Install and run the WSO2 Application Server. Refer to the Installation Guide for instructions.
2. In a command prompt, switch to the Jibx directory.
For example, cd <AS_HOME>\samples\Jibx
3. From there, type ant .
This will build the LibraryService.aar file in the target directory and copy it to the <AS_HOME>/repository/deployment/server/axis2services directory. You can view the WSDL for this service at: http://<host>:<port>/services/LibraryService?wsdl
Running the Client
To run a sample client for the service, go to <AS_HOME>\samples\Jibx directory and use run-client.sh (in Linux) or run-client.bat (in Windows).
You can also,Â
- Invoke the service through the Try-It tool .
- Use Tools -> WSDL2Java to generate the client stubs pointing to the wsdl and invoke the service with that.
Tips:
Also refer to the following external URLS.