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

Relative schema location import fails on Windows machines

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.2.8, 2.3
    • Resources
    • None
    • Windows XP

    Description

      If I have a WSDL that imports a schema from a relation path such as below, it does not work in Windows.

      		<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      			<xsd:import namespace="urn:RelPath" schemaLocation="../schemas/configuration/bar.xsd">
      			</xsd:import>
      		</xsd:schema>
      

      It is because of two issues in org.apache.cxf.resource.URIResolver.

      1) URIResolver checks for baseUriStr.startsWith("file:/") but Windows file URI could be "file:C:/foo/bar"

      2) URIResolver would include fragment (e.g. #type2) as file path when creates a File object. This is not showing up as a problem in UNIX machines because "new URI(baseUriStr)" is able to parse the baseUriStr correctly.

      Attachments

        1. CXF-2724.patch
          9 kB
          William Tam

        Activity

          People

            njiang Willem Jiang
            wtam William Tam
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: