1 year ago
#358381

Hok
Maven cxf-codegen-plugin doesn't follow redirect in xsd:import
I have a Maven project where Java code is generated from a WSDL file using org.apache.cxf:cxf-codegen-plugin 3.5.1
The WSDL imports an XSD schema, which in turn imports a schema from schemas.xmlsoap.org using this directive:
<xsd:import namespace="http://schemas.xmlsoap.org/soap/envelope/" schemaLocation="http://schemas.xmlsoap.org/soap/envelope/"/>
Yesterday this schema was moved temporarily (HTTP/1.1 307 Temporary Redirect) to https://schemas.xmlsoap.org/soap/envelope/
Now the SAX parser fails with org.xml.sax.SAXParseException: premature end of file, apparently because the XSD import doesn't follow the redirect and returns an empty file.
I would gladly change the schemaLocation to https, but since it's only a temporary redirect, I'd rather follow the redirect instead.
Is there a configuration option for Apache CXF to follow redirects? I didn't find any at https://cxf.apache.org/.
java
maven
soap
xsd
cxf
0 Answers
Your Answer