[ 
https://issues.apache.org/jira/browse/CXF-8655?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andriy Redko updated CXF-8655:
------------------------------
    Fix Version/s: 3.5.2
                   3.4.7
                   4.0.0

> Incorrect XSD resolution when the file name is the same in different folders
> ----------------------------------------------------------------------------
>
>                 Key: CXF-8655
>                 URL: https://issues.apache.org/jira/browse/CXF-8655
>             Project: CXF
>          Issue Type: Bug
>          Components: Simple Frontend
>    Affects Versions: 3.5.0, 3.3.12, 3.4.5
>            Reporter: Ricardo Martin
>            Priority: Major
>             Fix For: 3.5.2, 3.4.7, 4.0.0
>
>         Attachments: wsdl-test.zip
>
>
> The attached gradle project contains a WSDL file which imports a XSD and it, 
> in turn, imports another two XSD files with the same name but located in 
> different directories. It triggers incorrect resolution of the XSD files. The 
> structure is the following:
> {noformat}
> 1) MyWebservice.wsdl
>    1.1) imports schema/MyWebservice.xsd -> schema/MyWebservice.xsd
>         1.1.1) imports ../../../common/common.xsd -> ../../common/common.xsd
>         1.1.2) imports ../../common/common.xsd -> ../common/common.xsd
>                1.1.2.1) imports ../../common/common.xsd -> 
> ../../common/common.xsd
> {noformat}
> The resulting imports are:
> {noformat}
> 1) http://localhost:8080/wsdl-test/MyWebservice?wsdl (OK)
>    1.1) 
> http://localhost:8080/wsdl-test/MyWebservice?xsd=schema/MyWebservice.xsd (OK)
>         1.1.1) 
> http://localhost:8080/wsdl-test/MyWebservice?xsd=../../common/common.xsd (KO)
>         1.1.2) 
> http://localhost:8080/wsdl-test/MyWebservice?xsd=../common/common.xsd (OK)
>                1.1.2.1) 
> http://localhost:8080/wsdl-test/MyWebservice?xsd=../../common/common.xsd (KO)
> {noformat}
>    
> The URL 
> {{[http://localhost:8080/wsdl-test/MyWebservice?xsd=../../common/common.xsd]}}
>  in 1.1.1 returns invalid content. The content is the file in 1.1.2 (not 
> 1.1.1) and besides the contained import is not rewritten in its location.
>  
> h3. Steps To reproduce:
>  * Download attached maven project.
> {code}
> unzip wsdl-test.zip
> cd wsdl-test/
> mvn clean package
> mvn jetty:run
> {code}
> * Go to the wsdl {{http://localhost:8080/wsdl-test/MyWebservice?wsdl}} and 
> follow imports until 
> {{http://localhost:8080/wsdl-test/MyWebservice?xsd=../../common/common.xsd}} 
> and check the received output is incorrect.
> * You can also execute the client while the jetty is running with:
> {code}
> mvn exec:java
> {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to