The JAXB XJC schema binding compiler transforms, or binds, a source XML schema to a set of JAXB content classes in the Java programming language.
But sometimes we need more specific stuff in the generated java class.
For exmaple, the JAXB2 Basics Plugins says “Schema compiler (XJC) produces schema-derived classes which can be used to turn XML into object structures and back. However, generated classes lack by default lack convenience and utility methods like equals(…), hashCode(…), toString() and so on.”

We can use Metro’s JAXB 2.0 commons project to save time.

Reference:
1. JAXB 2.0 commons project
2. Using JAX-WS With Maven
3. JAX-WS Metro and JBossWS
4. Java EE5 JAXB tutorial

Advertisements