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

schemaLocation in xsd import is not rewritten correctly in Java 8

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.6, 2.7.17, 3.1.2
    • Component/s: None
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      This issue exists for the current and all previous cxf versions that will be run with Java 8.

      Java 7 and Java 8 yield different rewritten schemaLocations for an app that processes multiple
      wsdls.

      Using Java 7, their XSD schemaLocations are correctly expanded like this:

      <import namespace="http://ossj.org/xml/Common/v1-5" schemaLocation="http://localhost:8080/SmpOrderMgrWebServices/JVTOrderManagementSessionSOAP12?xsd=OSSJ-Common-v1-5.xsd"/>
      <import namespace="http://ossj.org/xml/Common-CBEBi/v1-5" schemaLocation="http://localhost:8080/SmpOrderMgrWebServices/JVTOrderManagementSessionSOAP12?xsd=OSSJ-Common-CBEBi-v1-5.xsd"/>
      <import namespace="http://ossj.org/xml/Common-CBECore/v1-5" schemaLocation="http://localhost:8080/SmpOrderMgrWebServices/JVTOrderManagementSessionSOAP12?xsd=OSSJ-Common-CBECore-v1-5.xsd"/>
      <import namespace="http://ossj.org/xml/Common-CBEResource/v1-5" schemaLocation="http://localhost:8080/SmpOrderMgrWebServices/JVTOrderManagementSessionSOAP12?xsd=OSSJ-Common-CBEResource-v1-5.xsd"/>
      <import namespace="http://ossj.org/xml/Common-CBEDatatypes/v1-5" schemaLocation="http://localhost:8080/SmpOrderMgrWebServices/JVTOrderManagementSessionSOAP12?xsd=OSSJ-Common-CBEDatatypes-v1-5.xsd"/>
      <import namespace="http://ossj.org/xml/Common-CBEProduct/v1-5" schemaLocation="http://localhost:8080/SmpOrderMgrWebServices/JVTOrderManagementSessionSOAP12?xsd=OSSJ-Common-CBEProduct-v1-5.xsd"/>
      <import namespace="http://ossj.org/xml/Common-CBEProductOffering/v1-5" schemaLocation="http://localhost:8080/SmpOrderMgrWebServices/JVTOrderManagementSessionSOAP12?xsd=OSSJ-Common-CBEProductOffering-v1-5.xsd"/>
      <import namespace="http://ossj.org/xml/Common-CBEService/v1-5" schemaLocation="http://localhost:8080/SmpOrderMgrWebServices/JVTOrderManagementSessionSOAP12?xsd=OSSJ-Common-CBEService-v1-5.xsd"/>
      <import namespace="http://ossj.org/xml/Common-CBEParty/v1-5" schemaLocation="http://localhost:8080/SmpOrderMgrWebServices/JVTOrderManagementSessionSOAP12?xsd=OSSJ-Common-CBEParty-v1-5.xsd"/>

      But on Java 8, only the first schemaLocation is expanded, the others are not:

      <import namespace="http://ossj.org/xml/Common/v1-5" schemaLocation="http://localhost:8080/SmpOrderMgrWebServices/JVTOrderManagementSessionSOAP12?xsd=OSSJ-Common-v1-5.xsd"/>
      <import namespace="http://ossj.org/xml/Common-CBEBi/v1-5" schemaLocation="./OSSJ-Common-CBEBi-v1-5.xsd"/>
      <import namespace="http://ossj.org/xml/Common-CBECore/v1-5" schemaLocation="./OSSJ-Common-CBECore-v1-5.xsd"/>
      <import namespace="http://ossj.org/xml/Common-CBEResource/v1-5" schemaLocation="./OSSJ-Common-CBEResource-v1-5.xsd"/>
      <import namespace="http://ossj.org/xml/Common-CBEDatatypes/v1-5" schemaLocation="./OSSJ-Common-CBEDatatypes-v1-5.xsd"/>
      <import namespace="http://ossj.org/xml/Common-CBEProduct/v1-5" schemaLocation="./OSSJ-Common-CBEProduct-v1-5.xsd"/>
      <import namespace="http://ossj.org/xml/Common-CBEProductOffering/v1-5" schemaLocation="./OSSJ-Common-CBEProductOffering-v1-5.xsd"/>
      <import namespace="http://ossj.org/xml/Common-CBEService/v1-5" schemaLocation="./OSSJ-Common-CBEService-v1-5.xsd"/>
      <import namespace="http://ossj.org/xml/Common-CBEParty/v1-5" schemaLocation="./OSSJ-Common-CBEParty-v1-5.xsd"/>

      To reproduce the issue, all you need to do is deploy the attached war file (SmpOrderMgrWebServices.war) and point your browser to:
      http://localhost:8080/SmpOrderMgrWebServices/JVTOrderManagementSessionSOAP12?xsd=OSSJ-OrderManagement-v1-0.xsd

        Attachments

        1. CXF-6469.patch
          1.0 kB
          Rebecca Searls
        2. SmpOrderMgrWebServices.war
          98 kB
          Rebecca Searls

          Activity

            People

            • Assignee:
              asoldano Alessio Soldano
              Reporter:
              rsearls Rebecca Searls
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: