[ 
https://issues.apache.org/jira/browse/CXFXJC-37?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16982286#comment-16982286
 ] 

Martin Deutsch commented on CXFXJC-37:
--------------------------------------

I've a proposal for a bugfix with tests and will created a pull request in the 
next days

> 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 disired 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.3.4#803005)

Reply via email to