[ 
https://issues.apache.org/jira/browse/AXIS2-2929?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12722098#action_12722098
 ] 

Dennis Sosnoski commented on AXIS2-2929:
----------------------------------------

You might want to give Jibx2Wsdl a try as an alternative: 
http://jibx.sourceforge.net/fromcode/jibx2wsdl.html Even though this is part of 
the JiBX project and generates JiBX bindings as part of the output, the 
generated WSDLs and schemas are fully compatible with other usage.

Unless someone objects, I'll add a link to Jibx2Wsdl in the Java2WSDL 
documentation, to help people experiencing this type of frustration.

> Java2WSDL does not correctly create enumerations from Enum
> ----------------------------------------------------------
>
>                 Key: AXIS2-2929
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2929
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>    Affects Versions: 1.2
>         Environment: Ubuntu 7.04
> Tomcat 6.0.13
> Java 1.5
>            Reporter: Sebastian Niezgoda
>            Assignee: Deepal Jayasinghe
>
> Hello,
> I have a bunch of Java 1.5 Enum objects, which look similar to:
> public enum MyEnum {
>   VAL,
>   ANOTHERVAL
>   public String value() {
>     return name();
>    }
>    
>    public static MyEnum fromValue(String v) {
>      return valueOf(v);
>   }
> }
> I run Java2WSDL and created is a complex type:
> <xs:complexType name="MyEnum">
>                               <xs:complexContent>
>                                       <xs:extension base="xs:Enum">
>                                               <xs:sequence>
>                                                       <xs:element 
> minOccurs="0" name="VAL" nillable="true" type="ax22:MyEnum"/>
>                                                       <xs:element 
> minOccurs="0" name="ANOTHERVAL" nillable="true" type="ax22:MyEnum"/>
>                                               </xs:sequence>
>                                       </xs:extension>
>                               </xs:complexContent>
>                       </xs:complexType>
> However, I believe the correct way to create the enumerations should be:
> <simpleType name="MyEnum">
>               <restriction base="token">
>                       <enumeration value="VAL"/>
>                       <enumeration value="ANOTHERVAL"/>
>               </restriction>
>       </simpleType>

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

Reply via email to