Question

I was a bit disillusioned as I was googling for how to customize auto generated java files from xsd. I started of letting the cxf.xjc maven plugin generate my java files, but now I need to change a few files to add extra basic getter functions and some other type adapters etc...

How can this be done? Can I somehow extend the ObjectFactory and tell JAXB to use my custom object factory for unmarshalling?

If yes, does JAXB by default take the annotations of the highest class in the object hierarchy if there are some annotation inconsistencies between generated classes and my custom files extending the generated classes?

Was it helpful?

Solution

With xjc compiler or corresponding Ant or Maven plugins you can specify additional plugins and for custom adapters you can add binding annotations to your xsd or external bindings schema.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top