While trying to generate classes from a xsd, i got this error:
java.lang.IllegalArgumentException: Illegal class inheritance loop. Outer class OrderPropertyList may not subclass from inner class: OrderPropertyList
My xsd define a element to group a unbounded element like this:
<element minOccurs="0" name="orderPropertyList">
<complexType>
<sequence>
<element maxOccurs="unbounded" name="orderProperty" type="tns:orderProperty" />
</sequence>
</complexType>
</element>
And my customization binding follows as specified on this page, but it doesn′t work.
Here my binding:
<jaxb:bindings schemaLocation="../xsd/Schema.xsd" node="/xs:schema">
<jaxb:bindings node="//xs:element[@name='orderPropertyList']">
<jaxb:class name="OrderPropertyList"/>
</jaxb:bindings>
</jaxb:bindings>
My intention is to generate a individual class for orderPropertyList, not the default behave that is generating a inner class inside the root element of the xsd.
I′ve watched someone with the same intention here and here, but it doesn′t work properly for me. :(
JAXB version:
Specification-Version: 2.1
Implementation-Version: 2.1.8
Any help?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…