I am compiling a set of XSDs to Java classes using xjc. I would like to be able to override the data type definition for a given simple type. The XSD snippet is:<
Further options are:
jaxb:javaType but allows specifying the adapter class instead of unmarshal/marshal methods.I would actually argue that jaxb:class/@ref customization is not right for the simple type as this makes it a "class" type. This matters for the internal XJC model, some of the XJC plugins may handle your type incorrectly.
I think you should use jaxb:javaType here. Try: