JaxMe
  1. JaxMe
  2. JAXME-63

JaxMe (wrongly) accepts schema using <group ref="..." maxOccurs="unbounded"/>

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: current (nightly)
    • Fix Version/s: 0.5
    • Component/s: JaxMe Core
    • Labels:
      None
    • Environment:
      JDK 1.5.0, JaxMe CVS

      Description

      JaxMe accepts (and generates faulty code for) the following schema:

      <xs:group name="params">
      <xs:choice>
      <xs:element name="string" type="xs:string"/>
      <xs:element name="int" type="xs:int"/>
      <xs:element name="boolean" type="xs:boolean"/>
      </xs:choice>
      </xs:group>

      <xs:element name="call">
      <xs:complexType>
      <xs:group ref="params" maxOccurs="unbounded"/>
      </xs:complexType>
      </xs:element>

      However, it should give an error message about not supporting model groups with maxOccurs > 1, as it does with the following schema:

      <xs:element name="call">
      <xs:complexType>
      <xs:choice maxOccurs="unbounded">
      <xs:element name="string" type="xs:string"/>
      <xs:element name="int" type="xs:int"/>
      <xs:element name="boolean" type="xs:boolean"/>
      </xs:choice>
      </xs:complexType>
      </xs:element>

      Perhaps somewhat related to JAXME-61, but I think the correct behaviour would be to fail with an error message on the first schema above until support for groups with maxOccurs > 1 is working?

      1. JAXME63.patch
        10 kB
        Jochen Wiedmann

        Activity

        Hide
        Jochen Wiedmann added a comment -

        Interesting ... you've found some of the (surprisingly few) problems in the XS part.

        Show
        Jochen Wiedmann added a comment - Interesting ... you've found some of the (surprisingly few) problems in the XS part.
        Hide
        Jochen Wiedmann added a comment -

        Patch for the problem.

        Show
        Jochen Wiedmann added a comment - Patch for the problem.

          People

          • Assignee:
            Jochen Wiedmann
            Reporter:
            Fredrik Vraalsen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development