To use ota-schema-tools to create jaxb files from the opentravel schema, follow these simple steps:
Edit the ota-schema-tools/config/[spec]/xmlbeans/ota.xsd file to only include the schema that you want. (Where [spec] is the ota schema version ie., 2007A)
Add the xmlbeans jars to your classpath, or edit the build.xml file and change the property xmlbeans.home to point to the xmlbeans home directory.
Download
a schema
zip
file from
opentravel.org
and drop
it in the ota-schema-zip-files
directory, then type:
>
export ANT_OPTS=-Xmx512m
> ant xmlbeans
Your schema will be unzipped, organized, and cleaned up, compiled using xmlbeans, and placed in a jar.
If you need a little
more concrete example, check my blog Creating
jaxb files from the opentravel schema. Just replace xmlbeans for
jaxb in the examples.
Don <don@donandann.com>