Uploaded image for project: 'XMLBeans'
  1. XMLBeans
  2. XMLBEANS-380

Limit in string restriction types. Exceed it cause java ClassCast excetion during parsing.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Incomplete
    • Affects Version/s: Version 1.0.4, Version 1.0.4 (jdk1.3 port), Version 2 Beta 1, Version 2 Beta 2, Version 2, Version 2.1, Version 2.2, Version 2.2.1, Version 2.3, Version 2.3.1
    • Fix Version/s: None
    • Component/s: Compiler, Validator
    • Labels:
      None
    • Environment:
      Windows XP Pro with Java SDK 1.4.2_04

      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

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              baronig7 gabriele baroni
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: