You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Daniel Kulp (JIRA)" <ji...@apache.org> on 2011/09/09 20:09:10 UTC
[jira] [Resolved] (CXF-1427) wsdl2java: Generate first class Java
enum for inline element
[ 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