axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Denise Wu <>
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:restriction base="xs:string">
                        <xs:enumeration value="FICTION"/>
                        <xs:enumeration value="HISTORY"/>
                        <xs:enumeration value="NEWS"/>
                        <xs:enumeration value="POLITICS"/>
                        <xs:enumeration value="CHILDREN"/>

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

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

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

Thanks for your help

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message