Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 2.1.4
    • Fix Version/s: 2.2.6
    • Component/s: wsimport
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

      Description

      If wsimport is passed a jar: URL referring to a WSDL and one or more imports
      packaged in a jar, the tool is able to access the primary WSDL, but incorrectly
      generates the absolute references to the imported files.

      The problem seems to be in
      com.sun.tools.ws.wsdl.parserAbstractReferenceFinderImpl.findExternalResource() here:

      // absolutize URL.
      String ref = new URI(locator.getSystemId()).resolve(new
      URI(relativeRef)).toString();

      The system-id URI is correct, but the resolve() method returns just the relative
      reference.

      This code is a copy of matching code in xjc here:

      com.sun.tools.xjc.reader.internalizer.AbstractReferenceFinderImpl.

      Both would need to be corrected to resolve this issue.

        Issue Links

          Activity

          Hide
          jitu added a comment -

          assigning it to Rama

          Show
          jitu added a comment - assigning it to Rama
          Hide
          skandalfo added a comment -

          The problem seems to be that the jar:file:... URI matches the definition of an
          opaque URI: there is no "//" after the "scheme:" part, and thus, as stated here:

          http://java.sun.com/j2se/1.5.0/docs/api/java/net/URI.html#resolve(java.net.URI)

          the passed in URI is left alone.

          So the problem is the morphology of the jar: scheme. This may require using
          another "implementation" of a jar:-like scheme

          Show
          skandalfo added a comment - The problem seems to be that the jar: file: ... URI matches the definition of an opaque URI: there is no "//" after the "scheme:" part, and thus, as stated here: http://java.sun.com/j2se/1.5.0/docs/api/java/net/URI.html#resolve(java.net.URI ) the passed in URI is left alone. So the problem is the morphology of the jar: scheme. This may require using another "implementation" of a jar:-like scheme
          Hide
          jitu added a comment -

          Instead of URI.resolve(), may be URL resolution would work for jar: urls.

          Show
          jitu added a comment - Instead of URI.resolve(), may be URL resolution would work for jar: urls.
          Hide
          ramapulavarthi added a comment -

          Adding keyword metro2.0-waived as this is cornercase.

          Show
          ramapulavarthi added a comment - Adding keyword metro2.0-waived as this is cornercase.
          Hide
          jitu added a comment -

          Target for 2.2.2

          Show
          jitu added a comment - Target for 2.2.2
          Hide
          ramapulavarthi added a comment -

          This is a uncommon usage and waived for this release.

          Show
          ramapulavarthi added a comment - This is a uncommon usage and waived for this release.
          Hide
          miroslav.kos added a comment -

          Already fixed, see linked issue ...

          Show
          miroslav.kos added a comment - Already fixed, see linked issue ...

            People

            • Assignee:
              miroslav.kos
              Reporter:
              rjeberhardbea
            • Votes:
              1 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: