Uploaded image for project: 'XBean'
  1. XBean
  2. XBEAN-73

XsdGenerator generates <xs:any/> incorrectly

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.8
    • 3.0
    • spring
    • None

    Description

      On XsdGenerator.java line 102, the code reads:

      if (complexCount > 0) {
      out.println(" <xs:sequence>");
      for (Iterator iterator = element.getAttributes().iterator(); iterator.hasNext() {
      AttributeMapping attributeMapping = (AttributeMapping) iterator.next();
      if (!namespaceMapping.isSimpleType(attributeMapping.getType()))

      { generateElementMappingComplexProperty(out, namespaceMapping, attributeMapping); }

      }
      out.println(" <xs:any namespace='##other'/>"); // <--- PROBLEM!
      out.println(" </xs:sequence>");
      }

      but it really needs to be:
      out.println(" <xs:any namespace='##other' minOccurs='0' maxOccurs='unbounded' />");

      Attachments

        Activity

          People

            gnodet Guillaume Nodet
            kohsuke Kohsuke Kawaguchi
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: