How to prevent autogeneration of JAXBElement for xs:choice using xsdtojava?
问题 I'm generating java classes from XSD using cxf-xjc-plugin and xsdtojava plugin. Problem: I have no control of the xsd , and one element has a xs:choice which results in a JAXBElement . Unfortunately my xml serializer jackson cannot handle JAXBElement s. So I'm trying to achieve autogeneration to an Object rather than JAXBElement . But how? The xsd I have no control of: <xs:element name="payment"> <xs:complexType> <xs:choice maxOccurs="2"> <xs:element name="creditcard"> ... </xs:element> <xs