jaxb
  1. jaxb
  2. JAXB-517

schemagen generates invalid schemas

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.7
    • Fix Version/s: 2.2.1
    • Component/s: schemagen
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: Macintosh

      Description

      Attaching the testcase, the original issue was filed on jax-ws
      https://jax-ws.dev.java.net/issues/show_bug.cgi?id=563 , where jax-ws generates
      invalid schemas in he wsdl.

      Schemagen generates element references though such elements are not there in the
      other imported schema.

        Activity

        Hide
        Martin Grebac added a comment -

        Well, the construct is eventually correct - just the fact that it cannot get used from external schema is
        wrong - thus we cannot throw an exception. The fact why JAXB standalone generates different schema
        might come from the customizations that JAX-WS uses when invoking JAXB - I need to check that.

        Show
        Martin Grebac added a comment - Well, the construct is eventually correct - just the fact that it cannot get used from external schema is wrong - thus we cannot throw an exception. The fact why JAXB standalone generates different schema might come from the customizations that JAX-WS uses when invoking JAXB - I need to check that.
        Hide
        Martin Grebac added a comment -

        Fixed in trunk and all branches:
        https://jaxb2-sources.dev.java.net/source/browse/jaxb2-sources/jaxb-
        ri/runtime/src/com/sun/xml/bind/v2/schemagen/XmlSchemaGenerator.java?r1=1.26&r2=1.28

        Show
        Martin Grebac added a comment - Fixed in trunk and all branches: https://jaxb2-sources.dev.java.net/source/browse/jaxb2-sources/jaxb- ri/runtime/src/com/sun/xml/bind/v2/schemagen/XmlSchemaGenerator.java?r1=1.26&r2=1.28
        Hide
        ramapulavarthi added a comment -

        Did you try the attached testcase?
        I ran the attached testcase with jaxb-ri-trunk bits and I still see the issue.
        Please verify your fix.

        Show
        ramapulavarthi added a comment - Did you try the attached testcase? I ran the attached testcase with jaxb-ri-trunk bits and I still see the issue. Please verify your fix.
        Hide
        Martin Grebac added a comment -

        Sure, I did, but had to revert and change the fix because it didn't pass the TCK validation. I'm still looking
        for TCK friendly solution. May need to postpone this one to 2.2.1 because of that.

        Show
        Martin Grebac added a comment - Sure, I did, but had to revert and change the fix because it didn't pass the TCK validation. I'm still looking for TCK friendly solution. May need to postpone this one to 2.2.1 because of that.
        Hide
        Martin Grebac added a comment -

        The fix was merged to 2.1/2.2 branches, hopefully there won't be more
        regressions from this.

        Show
        Martin Grebac added a comment - The fix was merged to 2.1/2.2 branches, hopefully there won't be more regressions from this.

          People

          • Assignee:
            Martin Grebac
            Reporter:
            ramapulavarthi
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: