axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Denise Wu <wadie...@gmail.com>
Subject wsdl2java doesn't cope well with xml enumerations
Date Fri, 23 Sep 2011 09:01:35 GMT
Please could you help with this.

I have a 'BookCategory' element in my schema xml file defined as follows:

            <xs:element name="BookCategory">
                <xs:simpleType>
                    <xs:restriction base="xs:string">
                        <xs:enumeration value="FICTION"/>
                        <xs:enumeration value="HISTORY"/>
                        <xs:enumeration value="NEWS"/>
                        <xs:enumeration value="POLITICS"/>
                        <xs:enumeration value="CHILDREN"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:element>

When using wsdl2java, it generates several classes for 'BookCategory'
based on the number of enumerations:

BookCategory_type1.java
BookCategory_type2.java
BookCategory_type3.java
BookCategory_type4.java
BookCategory_type5.java

The question is, how to modify the schema and/or the way wsdl2java is
called in order to generate 'ideally' one class BookCategory.java
containing the real values (FICTION, HISTORY, ...etc) instead of
value1, value2, ...like this

value1 : BookCategory_FICTION
value2 : BookCategory_HISTORY
value3 : BookCategory_NEWS
value4 : BookCategory_POLITICS
value5 : BookCategory_CHILDREN

Thanks for your help

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


Mime
View raw message