I have two codes, in two different java projects, doing almost the same thing, (unmarshalling the input of a webservice according to an xsd-file).
But in one case I
It depends on the presence of XmlRootElement annotation on the class of your root element.
If you generate your JAXB classes from an XSD, the following rules are applied:
For that reason I often choose anonymous types for root elements.
You can customize the class name of this anonymous type with a customization file. E.g. create a bindings.xjc file like this: