I would like to use xjc to generate JAXB objects while using an XmlJavaTypeAdapter
I'm currently using the following in global bindings:
<xjc:javaType name="java.lang.Boolean"
xmlType="xsd:boolean"
adapter="path.to.my.CustomBooleanAdapter"/>
It generates the following code:
@XmlJavaTypeAdapter(CustomBooleanAdapter.class)
@XmlElement(type=String.class)
private Boolean finished;
However I would like the code to have the @XmlSchemaType of boolean and without the @XmlElement type String
@XmlJavaTypeAdapter(BooleanAdapter.class)
@XmlSchemaType(name = "boolean")
private Boolean finished;
Is there a way to tell xjc to generate the @XmlSchemaType annotation and remove the @XmlElement of type String
No comments:
Post a Comment