{{theTime}}

Search This Blog

Total Pageviews

JAXB Reference Implementation

Using the Runtime Binding Framework

Schema-2-Java

Schema-2-Java is the process of compiling one or more schema files into generated Java classes. Here are some of the basic steps for developing an app:

  1. Develop/locate your schema
  2. Annotate the schema with binding customizations if necessary (or place them in an external bindings file)
  3. Compile the schema with the XJC binding compiler
  4. Develop your JAXB client application using the Java content classes generated by the XJC binding compiler along with the javax.xml.bind runtime framework
  5. Set your CLASSPATH to include all of the JAR files
  6. Compile all of your Java sources with javac
  7. Run it!

Java-2-Schema

Java-2-Schema is the process of augmenting existing Java classes with the annotations defined in the javax.xml.bind.annotation package so that the JAXB runtime binding framework is capable of performing the un/marshal operations. Here are the basic steps for developing an app:

  1. Develop your data model in Java
  2. Apply the javax.xml.bind.annotation annotations to control the binding process
  3. Set your CLASSPATH to include all of the JAR files
  4. Compile your data model with javac (Important! make sure that you classpath includes jaxb-xjc.jar before running javac)
  5. The resulting class files will contain your annotations as well other default annotations needed by the JAXB runtime binding framework
  6. Develop your client application that uses the data model and develop the code that uses the JAXB runtime binding framework to persist your data model using the un/marshal operations.
  7. Compile and run your client application!

For more information about this process, see the the Java WSDP Tutorial and the extensive sample application documentation.

Building and Running the Sample Apps with Ant

To run the sample applications, just go into each sample directory, and run ant without any option.

A few sample applications do not use Ant. For those samples, refer to the included readme.txt files for instructions.

JAXB Reference Implementation — Java.net

No comments:

Kafka Consumer Parallelism

Kafka Parallel Consumer Options: Key-level parallelism:  Multiple threads process the messages from a single partition in parallel while ma...