Type: New Feature
Affects Version/s: 2.2.2
Fix Version/s: None
I'm using xjc to generate a JAXB model from an XSD schema with multiple imported namespaces. I would like to override the default namespace prefixes (ns1, ns2, ...) used by the JAXB marshaller by sensible defaults.
This can be done by setting an xmlns property in the @XmlSchema annotation at package level in package-info.java.
However, this file is generated by xjc by default, without any prefix definitions.
Currently, the only way of overriding this behaviour seems to be:
- Manually create package-info.java.
- Run xjc with the -npa option to avoid generating package-info.java.
It would be convenient if the generated package-info.java contained @XmlNs annotations using the prefixes defined in the schema to be compiled, if present. In addition, there should be a mechanism to override the defaults by a suitable xjb customization.