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-1427) wsdl2java: Generate first class Java enum for inline element
Date Fri, 09 Sep 2011 18:09:10 GMT

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

Daniel Kulp resolved CXF-1427.
------------------------------

       Resolution: Not A Problem
    Fix Version/s: Invalid
         Assignee: Daniel Kulp


Resolving as "Not a problem" with CXF.  CXF delegates to JAXB for the schema -> object
generation and thus is not part of CXF.

> wsdl2java: Generate first class Java enum for inline element
> ------------------------------------------------------------
>
>                 Key: CXF-1427
>                 URL: https://issues.apache.org/jira/browse/CXF-1427
>             Project: CXF
>          Issue Type: Improvement
>          Components: Tooling
>    Affects Versions: 2.0.3
>         Environment: n/a
>            Reporter: Phil Clay
>            Assignee: Daniel Kulp
>            Priority: Minor
>             Fix For: Invalid
>
>
> If a wsdl definition contains an element and separate type definition like the following:
> <xs:element name="MyEnumField" type="MyEnum" />
> <xs:simpleType name="MyEnum">
> 	<xs:restriction base="xs:string">
> 		<xs:enumeration value="Value0"/>
> 		<xs:enumeration value="Value1"/>
> 	</xs:restriction>
> </xs:simpleType>
> then wsdl2java will generate a first class java enumeration (public enum MyEnum), and
the field will be of the MyEnum type (protected MyEnum myEnumField).  This is perfect.
> However, if the type is inlined, such as the following:
> <xs:element name="MyEnumField">
> 	<xs:simpleType>
> 		<xs:restriction base="xs:string">
> 			<xs:enumeration value="Value0"/>
> 			<xs:enumeration value="Value1"/>
> 		</xs:restriction>
> 	</xs:simpleType>
> </xs:element>
> then wsdl2java will not generate a first class enumeration, and the myEnumField will
instead be a String (protected String myEnumField).
> It would be nice if the inline type definition generated a java enumeration as well.
 I'm not sure what the name of the enum would be.  Maybe something that combines the containing
type name and the element name?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message