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 sample
The JiBX Data Binding sample is located in <AS_HOME>\Samples\Jibx
directory.
For more information, see Building Axis2 Samples.
The generated service ( LibraryService.aar
) gets copied to the <AS_HOME>/repository/deployment/server/axis2services
directory automatically.You can view the WSDL for this service at:
http://<host>:<port>/services/LibraryService?wsdl
Running the client
You can use one of the following methods to run a sample client for the service:
Running the client via the terminal
From the terminal go to
<AS_HOME>\samples\Jibx
directory.Execute one of the following commands to run the client:
OS Command On Windows run-client.bat
On Linux/Solaris sh run-client.sh
Running the client via the UI
- Access and log in to the AS management console.
- On the Tools menu, click Try It.
- 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.
For more information, go to the following external URLS.