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

Andreas Rusch commented on CXF-8029:
------------------------------------

See [^cxf-URIResolver.patch] for my solution how to add redirect to 
URIResolver. Currently I don't check if http.autoredirect is set to true, maybe 
you want to add that.

I was testing with following WSDL: 
https://geres.bedag.ch/schemas/20180101/GeresResidentInfo_v1801.wsdl

> CXF WSDLToJava Generation fails if included XSD needs redirecting
> -----------------------------------------------------------------
>
>                 Key: CXF-8029
>                 URL: https://issues.apache.org/jira/browse/CXF-8029
>             Project: CXF
>          Issue Type: Improvement
>    Affects Versions: 3.3.1
>            Reporter: Andreas Rusch
>            Priority: Critical
>         Attachments: cxf-URIResolver.patch
>
>
> I need to generate a Java WS client from a WSDL file that includes a XSD 
> schema via <xs:include> with attribute schemaLocation="http://<path>".
> The problem I have now is caused by the fact that the XSD file is not 
> available through http any more, only via https.
> When I execute client generation with WSDLToJava I get the very confusing 
> error message 
> org.apache.cxf.tools.common.ToolException: 
> org.apache.cxf.wsdl11.WSDLRuntimeException: Fail to create wsdl definition 
> <wsdl_uri>: WSDLException (at /definitions/types/xs:schema): 
> faultCode=PARSER_ERROR: Problem parsing 'http://<xsd_path>'.: 
> org.xml.sax.SAXParseException: White spaces are required between publicId and 
> systemId.
> Debugging the code generation showed that WSDLToJava has two problems:
> First the default conduit behavior in TransportURIResolver has autoredirect 
> switched off. OK, I can change this myself from outside by setting a special 
> HTTPConduitConfigurer.
> Second, and here I can't change the behavior from outside, the used 
> URIResolver in CustomizedWSDLLocator does not support redirecting.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to