cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rastislav Cesnek (JIRA)" <>
Subject [jira] [Created] (CXF-4910) Bad handling of Schema imports (WSDLGetInterceptor)
Date Thu, 21 Mar 2013 13:53:15 GMT
Rastislav Cesnek created CXF-4910:

             Summary: Bad handling of Schema imports (WSDLGetInterceptor)
                 Key: CXF-4910
             Project: CXF
          Issue Type: Bug
          Components: Simple Frontend
    Affects Versions: 2.7.3
         Environment: Windows
            Reporter: Rastislav Cesnek

While doing my experiments with completely dynamic service creation from WSDL only, I found
suspicious code in WSDLGetInterceptor regarding schema cacheing. 
A following example results in incorrect behavior:

WSDLGetUtils.updateSchemaImports() uses a map for caching processed schemata.
A service built from following path layout
- Wsdl.wsld imports z/Types.xsd(NS: using relative path
- z/Types.xsd imports z/Types.xsd(NS: using relative path (i.e. imports

results in incorrect serving of service definition when querying the endpoint.

The link from wsdl to import points to "?xsd=z/Types.xsd".
<wsdl:definitions xmlns:xsd="" xmlns:wsdl=""
xmlns:tns="" xmlns:soap=""
name="Service" targetNamespace="">
<xsd:schema xmlns:xsd="" xmlns:wsdl=""
xmlns:tns="" xmlns:sty="" xmlns:soap=""
<xsd:import namespace="" schemaLocation="http://localhost:8080/Service?xsd=z/Types.xsd"/>

The link from z/Types.xsd points again to itself "?xsd=z/Types.xsd" (same content is served).
<xsd:schema xmlns:xsd="" xmlns:tns=""
xmlns:bty="" targetNamespace="">
<xsd:import namespace="" schemaLocation="http://localhost:8080/Service?xsd=z/Types.xsd"/>

This is because the WSDLGetUtils cuts of the schemata processing on the first import because
relative path is used as key identifier in the schema map.

I suspect the same applies for the WSDL imports in WSDLGetUtils.updateDefinition() due to
caching the definitions in the definition map.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message