JiBX/OTA is a set of examples and sample code intended to help developers working with the Open Travel Alliance schemas. It includes two different examples of JiBX code generation from the OTA schemas, an example of WSDL generation from a Java interface for a web service based on OTA messages, and two different sample implementations of a client and server for the web service.
JiBX offers a number of advantages over alternative data binding frameworks for working with the OTA schemas. For starters, it does a better job of handling schema definitions:
JiBX also provides much greater flexibility than other alternatives, including easy ways to:
On the web services side, JiBX gives the best support for generating WSDL service definitions from code (even if you're not actually using JiBX at runtime). When used with the JiBX/WS web services framework JiBX also provides the fastest web services available, including support for XBIS encoding which doubles your speed in converting to and from XML while cutting data volumes in half. JiBX/WS also gives the flexibility of using direct XML document exchanges (without SOAP wrappers), and efficient TCP socket transport (both with and without SOAP).
Before you can try out any of the JiBX/OTA examples you'll first need to download the current JiBX code and whichever version of the OTA schema distribution you're planning to use (available from the OTA Specifications page - the current build of JiBX/OTA has been tested with the OTA 2009A schemas, and partially tested with the 2010A public review schemas, but prior versions of the OTA schemas have also been used with JiBX code generation). You'll also need to have a Java 5 or later distribution installed on your development system (JiBX itself is compatible with older versions of Java, and can also generate code compatible with older versions of Java, but the examples are configured to use Java 5 typed collections). Finally, you'll need the Apache Ant build tool installed on your development system.
The distribution uses a hierarchy of directories for the different examples. At the root is the data model example, demonstrating code generation from the OTA schemas. The root level also includes this documentation, in the docs directory. The test directory contains test code which uses the generated data model to roundtrip sample documents provided with the OTA schemas, first unmarshalling each document into a data model structure, then marshalling the data model back to XML, and finally comparing the marshalled XML document with the original.
The webservice directory contains the web service demonstration code. The base directory contains source code for a Java interface class defining methods using the OTA request and response documents relating to air travel. This interface is used as input to the Jibx2Wsdl tool included in the JiBX distribution, which generates a WSDL service description from the interface. The axis2 and jibxws directories contain the code for two different implementations of the service, using the respective web services stacks.
You need to build a data model first, as discussed on the Data Models page. Once you have a data model, you can run the WSDL Generation step to create a WSDL service definition. You can then use the WSDL to build a Axis2 Implementation and/or a JiBX/WS Implementation of the web service.