Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-2163

org.apache.cxf.resource.URIResolver on Websphere 6.1 doesn't resolve from "wsjar:" base URI's

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.10, 2.1.4
    • 2.0.11, 2.1.5, 2.2.1
    • Core
    • None
    • Websphere 6.1, fixpack 21, with wsdl4j-1.6.2 in the JRE's "endorsed" folder

    • Novice

    Description

      Steps to reproduce:
      1) Put wsdl4j-1.6.2 in AppServer\java\jre\lib\endorsed, as is described on the CXF Wiki.
      2) Deploy a standard CXF webservice server setup, using jaxws:endpoint, but with the WSDL and referred XSD's deployed INSIDE a jar file. The WSDL is referring to the XSD using <xsd:import schemaLocation="mySchema.xsd"/>.
      3) When starting the application, exception FileNotFoundException is thrown on the referred XSD.

      CXF is looking for the XSD in the app server's root directory, instead of in the JAR file. This is caused by Websphere reporting the WSDL's URI in the format "wsjar:/path/to/archive.jar!/package/with/file.wsdl", instead of the normal Java way which would be "jar:/path/to/archive.jar!/package/with/file.wsdl" (note the different prefix). This confuses CXF's org.apache.cxf.resource.URIResolver class.

      The issue can be fixed by including checks on the "wsjar:" prefix around lines 79, 105, and 282. Those lines already check on "jar:" and "zip:".

      Attachments

        Activity

          People

            dkulp Daniel Kulp
            dutchieman Jan Ypma
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: