在尝试从xsd生成类时,我遇到了这个错误:
- java.lang.IllegalArgumentException: Illegal class inheritance loop. Outer class OrderPropertyList may not subclass from inner class: OrderPropertyList
我的xsd定义了一个元素来组合一个无界元素,如下所示:
- <element minOccurs="0" name="orderPropertyList">
- <complexType>
- <sequence>
- <element maxOccurs="unbounded" name="orderProperty" type="tns:orderProperty" />
- </sequence>
- </complexType>
- </element>
我的自定义绑定遵循this page中的规定,但它不起作用.
在这里我的约束:
- <jaxb:bindings schemaLocation="../xsd/Schema.xsd" node="/xs:schema">
- <jaxb:bindings node="//xs:element[@name='orderPropertyList']">
- <jaxb:class name="OrderPropertyList"/>
- </jaxb:bindings>
- </jaxb:bindings>