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

Daniel Kulp resolved CXF-4952.
------------------------------
       Resolution: Cannot Reproduce
    Fix Version/s: Invalid

We have a bunch of tests that test this.   A version wasn't specified so I 
don't know which version of CXF this applies to.  If this is still an issue 
with current versions of CXF, please re-open and attach a test case.

> Initiating java web service client passing local WSDL file with relative path 
> to XSD in schemaLocation
> ------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-4952
>                 URL: https://issues.apache.org/jira/browse/CXF-4952
>             Project: CXF
>          Issue Type: Bug
>            Reporter: Maciej PietroĊ„
>             Fix For: Invalid
>
>
> I have WSDL and XSD files stored localy. Using CXF (wsdl2java tool) - I have 
> generated client service classes. To service class constructor I pass local 
> path to WSDL file like this:
> MyService(MyService.class.getResource("my_wsdl_file.wsdl"), someQName)
> And this part work fine - I mean path passing to service constructor is fine. 
> Problem occurs while parsing the WSDL file. In WSDL file there is:
> <xsd:schema xmlns:xsd="http://www.some_schema_address.org/XMLSchema";>
>     <xsd:import namespace="http://www.some_schema_address.org/XMLnamespace"; 
> schemaLocation="my_xsd_file.xsd">
>     </xsd:import>
> </xsd:schema>
> The my_xsd_file.xsd file is stored in the same location as my_wsdl_file.wsdl, 
> but parser cannot find it. It appears that relative paths weren't being 
> resolved relative to the current directory the WSDL was located in.
> I am using WebSphere Application Server. Locations of WSDL and XSD files in 
> the deployed application are:
> C:\Program 
> Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\myCellName\myApplicationName.ear\myWebserviceName.jar\org\some_package\my_wsdl_file.wsdl
> C:\Program 
> Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\myCellName\myApplicationName.ear\myWebserviceName.jar\org\some_package\my_wsdl_file.xsd
> Parser searching XSD file in:
> C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\my_wsdl_file.xsd
> I was checking sources a bit (I didn't checked it thoroughly, so in this part 
> I could be wrong), and it seems that class: 
> com.ibm.wsdl.xml.WSDLReaderImpl take relative paths from class wsdlLocator 
> that was passed to readWSDL method by 
> org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(String url). 
> There root is obtaining by wsdlLocator.getBaseInputSource() method, witch in 
> fact return InputSource.getSystemId() instead of location on WSDL file.     



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to