[
https://issues.apache.org/jira/browse/CXFXJC-37?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Colm O hEigeartaigh resolved CXFXJC-37.
---------------------------------------
Resolution: Fixed
> Generated code is not compilable using super-types and super-elements are
> used in the xsd
> -----------------------------------------------------------------------------------------
>
> Key: CXFXJC-37
> URL: https://issues.apache.org/jira/browse/CXFXJC-37
> Project: CXF XJC Utils
> Issue Type: Bug
> Components: DV Plugin
> Affects Versions: 3.3.0
> Reporter: Martin Deutsch
> Priority: Major
>
> If super-types and super-elements are used in the xsd, the code does not
> compile due to the default constructor of the JAXBElement is generated. The
> JAXBElement has no default constructor.
> Add this to your {{foo.xsd}} in the {{cxf-xjc-dv-test}} module so you will
> get the desired result:
> {code:xml}
> <xs:element name="fooSuperelement" type="tns:fooSupertype" />
> <xs:complexType name="fooSupertype" abstract="true" />
>
> <xs:element name="fooWithSubstitutionGroup" type="tns:fooWithReference"
> substitutionGroup="tns:fooSuperelement" />
>
> <xs:complexType name="fooWithReference">
> <xs:complexContent>
> <xs:extension base="tns:fooSupertype">
> <xs:sequence>
> <xs:element minOccurs="1" maxOccurs="1"
> ref="tns:fooSuperelement" />
> </xs:sequence>
> </xs:extension>
> </xs:complexContent>
> </xs:complexType>
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)