Details
Description
We noticed a regression related to live WSDL XSD import schemaLocation updates.
The problem reproduces in 3.1.4 and 3.1.3, but not in 3.1.2.
The scenario is as follows:
- We have a contract-first WSDL HelloService.wsdl
- HelloService.wsdl imports hello.xsd using a relative schemaLocation
- hello.xsd imports hello-types.xsd using a catalog name / uri schemaLocation
- hello-types.xsd imports hello-types-imported.xsd using a relative schemaLocation
When we access http://localhost:8080/ws/hello?xsd=urn:xsd/hello-types.xsd, the reference to hello-types-imported.xsd is not updated. As a result of this, the WSDL is unreadable from an external client.
In 3.1.3, the hello-types.xsd is presented like this:
<xsd:import namespace="http://hello.respiro.kantega.org/ws/hello-types-1.0" schemaLocation="../xsd/hello-types-imported.xsd"/>
In 3.1.2, hellotypes.xsd was presented like this:
<xsd:import namespace="http://hello.respiro.kantega.org/ws/hello-types-1.0" schemaLocation="http://localhost:8080/ws/hello?xsd=../xsd/hello-types-imported.xsd"/>
Looking through the bug fixes for 3.1.3, I noticed CXF-6034. Could this regression be caused by changes related to that issue?
I've created a stand-alone reproducing Maven project for this and put it on Github: https://github.com/eirbjo/cxf-6717-catalog-schemalocation
How to reproduce:
git clone https://github.com/eirbjo/cxf-6717-catalog-schemalocation
cd cxf-6717-catalog-schemalocation
mvn clean install
This should cause the integration test CatalogImportIT to fail.
Observing the issue manually:
mvn jetty:run
The open http://localhost:8080/ws/hello?xsd=urn:xsd/hello-types.xsd
Change cxf.version in pom.xml to 3.1.2 and mvn clean install builds successfully.
Attachments
Issue Links
- is related to
-
CXF-5743 Full path is missing from schema included in imported schema when parsing WSDL
-
- Closed
-