axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebastian Niezgoda (JIRA)" <j...@apache.org>
Subject [jira] Created: (AXIS2-2929) Java2WSDL does not correctly create enumerations from Enum
Date Mon, 09 Jul 2007 17:43:04 GMT
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


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.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Mime
View raw message