Details
Description
I declare in an xsd a simpleType, restriction of String like this:
<xs:simpleType name="DUG">
<xs:restriction base="xs:string">
<xs:enumeration value="ALZATA"/>
<xs:enumeration value="ANDRONA"/>
<xs:enumeration value="ARCHIVOLTO"/>
<xs:enumeration value="ARCO"/>
<xs:enumeration value="ASCENSORE"/>
<xs:enumeration value="ATRIO"/>
<xs:enumeration value="BACINO"/>
<xs:enumeration value="BAGLIO"/>
<xs:enumeration value="BANCHINA"/>
<xs:enumeration value="BORGATA"/>
<xs:enumeration value="BORGHETTO"/>
<xs:enumeration value="BORGO"/>
<xs:enumeration value="CALATA"/>
<xs:enumeration value="CALLE"/>
<xs:enumeration value="CALLESELLA"/>
<xs:enumeration value="CAMPASSO"/>
<xs:enumeration value="CAMPAZZO"/>
<xs:enumeration value="CAMPIELLO"/>
<xs:enumeration value="CAMPO"/>
<xs:enumeration value="CASALE"/>
<xs:enumeration value="CASE"/>
<xs:enumeration value="CAVA"/>
<xs:enumeration value="CAVALCAVIA"/>
<xs:enumeration value="CHIASSO"/>
<xs:enumeration value="CIRCONVALLAZIONE"/>
<xs:enumeration value="CLIVIO"/>
<xs:enumeration value="CONTRADA"/>
<xs:enumeration value="CORSETTO"/>
<xs:enumeration value="CORSO"/>
<xs:enumeration value="CORTE"/>
<xs:enumeration value="CORTICELLA"/>
<xs:enumeration value="CORTILE"/>
<xs:enumeration value="CUPA"/>
<xs:enumeration value="DIRAMAZIONE"/>
<xs:enumeration value="DISCESA"/>
<xs:enumeration value="FONDACO"/>
<xs:enumeration value="FONDAMENTA"/>
<xs:enumeration value="FONDO"/>
<xs:enumeration value="FRAZIONE"/>
<xs:enumeration value="GALLERIA"/>
<xs:enumeration value="GIARDINO"/>
<xs:enumeration value="GRADINI"/>
<xs:enumeration value="GRADONI"/>
<xs:enumeration value="LARGO"/>
<xs:enumeration value="LISTA"/>
<xs:enumeration value="LOGGE"/>
<xs:enumeration value="LUNGADIGE"/>
<xs:enumeration value="LUNGARGINE"/>
<xs:enumeration value="LUNGARNO"/>
<xs:enumeration value="LUNGODORA"/>
<xs:enumeration value="LUNGOMARE"/>
<xs:enumeration value="LUNGOPO"/>
<xs:enumeration value="LUNGOSTURA"/>
</xs:restriction>
</xs:simpleType>
After I create, using xmlbeans (version 2.4.0 but also 1.04) generated JAR,
an XmlObject with a DUG type element in it; I serialize it in a java String and after I try to parse it
using the same JAR.
I obtain a ClassCast exception unless the cardinality of <xs:enumeration> elements in my simpleType declaration are minor or equal to 39.
thank's, Gabriele Baroni