jaxb
  1. jaxb
  2. JAXB-236

the property customization to xs:choice does not work when the simple binding mode is usesd

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.1
    • Fix Version/s: not determined
    • Component/s: xjc
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      236

      Description

      I use JAXB 2.1 nighty build on Sept. 6.

      The folloing is the part of the schema:
      <xs:choice>
      <xs:annotation>
      <xs:appinfo>
      <jaxb:property name="Shapes"/>
      </xs:appinfo>
      </xs:annotation>
      ......
      </xs:choice>
      and I have the folloiwng global declaration:
      <jaxb:globalBindings>
      <xjc:simple />
      <xjc:superClass name="com.syh.Shape"/>
      </jaxb:globalBindings>

      If the simple binding mode is used, XJC displays the following message:
      [xjc] [ERROR] compiler was unable to honor this property customization. It
      is attached to a wrong place, or its inconsistent with other bindings.

      But if the simple binding is not used, XJC can process the schema correctly.

        Activity

        Hide
        kohsuke added a comment -

        Lowering priority to P4 for coming 2.1 release.

        Show
        kohsuke added a comment - Lowering priority to P4 for coming 2.1 release.
        Hide
        Martin Grebac added a comment -

        Simple mode is an experimental support feature.

        Show
        Martin Grebac added a comment - Simple mode is an experimental support feature.
        Hide
        Alexey Dets added a comment -

        This problem is still present in the latest 2.2.5 release. I understand that simple mode is officially an experimental feature, however in practice it is also probably the mostly used mode because it generates much better Java code then default mode. I believe many people will appreciate the fix. It is nearly 6 years since this bug was reported...

        Show
        Alexey Dets added a comment - This problem is still present in the latest 2.2.5 release. I understand that simple mode is officially an experimental feature, however in practice it is also probably the mostly used mode because it generates much better Java code then default mode. I believe many people will appreciate the fix. It is nearly 6 years since this bug was reported...
        Hide
        Iaroslav Savytskyi added a comment -

        Hi, Alexey,

        can you please provide some small test for this issue. Thanks.

        Show
        Iaroslav Savytskyi added a comment - Hi, Alexey, can you please provide some small test for this issue. Thanks.
        Hide
        Alexey Dets added a comment -

        This is a very small Eclipse project with JAXB-2.2.5. build.xml is provided, should work with minimal tweaking without Eclipse as well. As is everything works, Java bindings are generated successfully. In order to reproduce the problem uncomment the line with "<xjc:simple />" in xsd/package.xjb.

        Show
        Alexey Dets added a comment - This is a very small Eclipse project with JAXB-2 .2.5. build.xml is provided, should work with minimal tweaking without Eclipse as well. As is everything works, Java bindings are generated successfully. In order to reproduce the problem uncomment the line with "<xjc:simple />" in xsd/package.xjb.

          People

          • Assignee:
            Iaroslav Savytskyi
            Reporter:
            guofeng
          • Votes:
            5 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated: