cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tomas Hofman (JIRA)" <>
Subject [jira] [Commented] (CXF-6392) Schema imports are not handled correctly in generated WSDL and XSD files
Date Wed, 06 May 2015 15:02:00 GMT


Tomas Hofman commented on CXF-6392:

Note that CXF-6234 and CXF-4910 were already trying to solve that.

> Schema imports are not handled correctly in generated WSDL and XSD files
> ------------------------------------------------------------------------
>                 Key: CXF-6392
>                 URL:
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 3.1.0, 2.7.16
>            Reporter: Tomas Hofman
> 1) XSD files cannot be accessed by URLs that should be enabled by XML catalog rules.
> 2) Under some circumstances, schema location attributes in <include> elements are
not rewritten to "?xsd=location" form
> *Situation:*
> - We have following rule in jax-ws-catalog.xml:
> {code}
>    <rewriteSystem systemIdStartString="" rewritePrefix="/wsdl/schemata/"/>
> {code}
> - We have WSDL file importing an XSD file, which in turn is including another XSD file,
all located in /wsdl/ directory on classpath:
> {code}
> /wsdl/service.wsdl
> /wsdl/schemata/schema.xsd
> /wsdl/schemata/included_schema.xsd
> {code}
> - WSDL file contains import like this, with *relative path*:
> {code}
> <import namespace="" 
>         schemaLocation="schemata/schema.xsd"/>
> {code}
> - schema.xsd file contains following include, again with relative path:
> {code}
> <xsd:include schemaLocation="included_schema.xsd"/>
> {code}
> *Problem 1:*
> XSD file cannot be accessed by URL http://localhost:PORT/SoapContext/SoapPort?xsd=,
which is supposed to be working due to rewriteSystem rule.
> It can only be accessed with relative path URL: "?xsd=schemata/schema.xsd".
> This (meaning the first URL http://localhost:PORT/SoapContext/SoapPort?xsd=
starts working when import in WSDL file is modified to use full URL instead of relative path:
> {code}
> <import namespace="" 
>         schemaLocation=""/>
> {code}
> *Problem 2:*
> When schema.xsd is accessed by request using full url like "?xsd=",
instead of relative url, schemaLocation attribute in <import> and <include> elements
in that file are not rewritten into "?xsd=..." form, so those schemaLocations cannot be followed
by client.
> I'm attaching also a PR with a test case demonstrating described behaviour, and proposed

This message was sent by Atlassian JIRA

View raw message