cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmitry Ivanov (JIRA)" <>
Subject [jira] [Comment Edited] (CXF-5637) WSDL First approach : Xsd import in wsdl causing validation errors while generating client.
Date Wed, 14 Jan 2015 14:50:35 GMT


Dmitry Ivanov edited comment on CXF-5637 at 1/14/15 2:50 PM:

If one xsd-file has import of another xsd-file, CFX (I'm using 2.6.14 version in apache-tomee-plus-1.7.1)
does not translate its schemaLocation.

Here I attached small example of webservice with wsdlLocation = "WEB-INF/wsdl/NewWebService/TestService2.wsdl"
in its annotation @WebService.
As you see TestService2.wsdl has xsd-import: <xsd:include schemaLocation="xsd/TestService2/Func1.xsd"/>
And Func1.xsd has xsd-import: <xsd:include schemaLocation="../SimpleTypes.xsd"/>

During runtime CFX translates only first location to: <xsd:include schemaLocation="http://localhost:8080/TestWebApplication/TestService2?xsd=xsd/TestService2/Func1.xsd"/>
And does not translate second.

So many code-generator can't correctly resolve and download this location "../SimpleTypes.xsd".
Some of them try to download "http://localhost:8080/TestWebApplication/TestService2?xsd=xsd/TestService2/Func1.xsd/../SimpleTypes.xsd"
and fail.
Another try to download "http://localhost:8080/TestWebApplication/../SimpleTypes.xsd" and
fail too...

May be you can realize Metro logic? It just numerates all xsd-imports and then translates
their schemaLocation into "http://localhost:8080/TestWebApplication/TestService2?xsd=<NUMBER_OF_XSD>".

was (Author: dim666):
Example of test web-application that shows bug of importing xsd from xsd

> WSDL First approach : Xsd import in wsdl causing validation errors while generating client.
> -------------------------------------------------------------------------------------------
>                 Key: CXF-5637
>                 URL:
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.7.5
>            Reporter: Anshul Rohilla
>             Fix For: NeedMoreInfo
>         Attachments:
> Hey,
> I am using CXF WSDL first appraoch with which I am exposing a WSDL. This wsdl have many
XSD imports in it. Also the imported XSD's have various XSD's imports.
> Now when I try to generate client from file system it works fine without giving any errors
or warnings. 
> But when I expose the same WSDL using CXF 2.7.5 JAX-WS endpoint and try generating client
from exposed WSDL url from server, it start giving validating errors in imported XSD.
> I tried various methods by failed to resolve this. 
> Can you please help me in this.

This message was sent by Atlassian JIRA

View raw message