[ 
https://issues.apache.org/jira/browse/CXF-3917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13151169#comment-13151169
 ] 

Freeman Fang commented on CXF-3917:
-----------------------------------

Hi Pablo,

Thanks for the patch, but I'm not sure it's something wrong in CXF we need fix.
Given the testcase we have added by CXF-3095[1], which exactly demonstrate 
relative schema location works.
Also per the discussion from[1], you could encounter issues if you misuse 
import/include schema in the wsdl, you may need take a look at the discussion 
there and ensure you're not that case.

[1]https://issues.apache.org/jira/browse/CXF-3095

Freeman
                
> Schema validation does not resolve relative schema locations
> ------------------------------------------------------------
>
>                 Key: CXF-3917
>                 URL: https://issues.apache.org/jira/browse/CXF-3917
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.3.1
>            Reporter: Pablo Kraan
>         Attachments: cxfRelativeSchemaValidation.patch
>
>
> Relative schema location works OK when schema validation is not enabled, but 
> when is enabled the validator is not able to properly resolve the relative 
> schema locations.
> The problem is simple: the ResolvingGrammarReaderController does not try to 
> resolve the relative schema files, it just returns null every time is 
> invoked, so the relative schema files are not resolved using the WSDL base 
> path, they are attempted to be resolved using the base path of the running 
> application. The fix is just to pass the base URI and use a URIResolver to 
> resolve the entities.
> We are using CXF inside Mule and I have no experience working with CXF alone, 
> so I don't have a way to reproduce this and the wstx-msv-validation module 
> does not have any test that I can use as an example... but the fix was tested 
> from our side and works :)
> NOTE: the problem was detected using CXF 2.3.1 but the relevant code in trunk 
> is still the same.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to