cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Kulp (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (CXF-2707) CXF-XJC-DV doesn not respect Abstract schema types
Date Fri, 12 Mar 2010 01:47:27 GMT

     [ https://issues.apache.org/jira/browse/CXF-2707?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Daniel Kulp resolved CXF-2707.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.2.7
         Assignee: Daniel Kulp

> CXF-XJC-DV doesn not respect Abstract schema types
> --------------------------------------------------
>
>                 Key: CXF-2707
>                 URL: https://issues.apache.org/jira/browse/CXF-2707
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.2.1
>            Reporter: Jan Arend Jansen
>            Assignee: Daniel Kulp
>            Priority: Minor
>             Fix For: 2.2.7
>
>         Attachments: DefaultValuePlugin.java
>
>
> The cxf-xjc-dv plugin creates default values for complex types that have default simpl
typed elements as fixed in CXF-1206.
> {code:xml}
> <xs:complexType name="pageColor">
>   <xs:sequence>
>      <xs:element name="background" type="xs:string" default="red"/>
>      <xs:element name="foreground" type="xs:string" default="blue"/>
>    </xs:sequence>
> </xs:complexType>
> <xs:element name="pageColor" type="tns:pageColor" minOccurs="0"></xs:element>
> {code}
> results in 
> {code}
> protected PageColor pageColor = new PageColor();
> {code}
> This fails if PageColor is defined as abstract="true" in the schema (used as polymorphic
type in element pageColor). In that case the line above will create a compilation error. 
> It can be fixed by simply skipping the generation of the default 'new PageColor();' in
those cases.  
> Line 81 in DefaultValuePlugin.java would become
> {code}
>             if (classOutline.implClass == field.getRawType() && !classOutline.implClass.isAbstract())
{
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message