Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-2766

XSD not generated correctly for java 1.5 enum

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Axis2 1.2, XP

      Description

      Given the following Java Code:

      public enum Values
      {
      One,Two,Three
      }

      public class EnumTest
      {

      private Values _value;

      public Values getValue()

      { return _value; }

      public void setValue(Values value)

      { _value = value; }

      }

      The type generated in the WSDL is incorrect. According to both SOAPScope and XMLSpy "xs:Enum" is not a valid xml schema type:
      <xs:complexType name="Values">
      <xs:complexContent>
      <xs:extension base="xs:Enum">
      <xs:sequence>
      <xs:element name="One" nillable="true" type="ns:Values" />
      <xs:element name="Three" nillable="true" type="ns:Values" />
      <xs:element name="Two" nillable="true" type="ns:Values" />
      </xs:sequence>
      </xs:extension>
      </xs:complexContent>
      </xs:complexType>

        Attachments

        1. EnumTest.xml
          4 kB
          Drew Bentley

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                drew bentley Drew Bentley
              • Votes:
                2 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: