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

error compiling classes when using a schema with a redefined subelement

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Version 1
    • Fix Version/s: Version 2 Beta 2, Version 2
    • Component/s: Compiler
    • Labels:
      None

      Description

      when trying to compile the two schemas ('Core.20020831.xsd' and 'Core.20020225.xsd') i get a java compile error because of an overridden 'getInfo()' method in 'ReferencesCheckResultType', which declares a different return type in the base type 'CheckResultType'. you have to compile the schema using the -nopvr option.

      the root cause is: while 'ReferencesCheckResultType' is derived from 'CheckResultType', it also declares an 'Info' subelement which has a different type than the 'Info' subelement in 'CheckResultType'. although from a xml schema point of view these two types are compatible.

      i didn't find any way to work around this. i think this is a rather fundamental problem, rooted in the mismatch between the xml schema model and java object model. maybe there's a way of working around this by configuration (e.g. by being able to redefine the names of getters/setters for certain subelements).

        Attachments

        1. Core.20020831.xsd
          8 kB
          Patrick Peck
        2. Core.20020225.xsd
          18 kB
          Patrick Peck

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              patrick.peck Patrick Peck
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: