membrane / soa-model

Toolkit and Java API for WSDL, WADL and XML Schema.
http://www.membrane-soa.org/soa-model/
Apache License 2.0
93 stars 73 forks source link

FileNotFoundException trying to load import by an absolute path #267

Open artem-mindrov opened 6 years ago

artem-mindrov commented 6 years ago

I have a case where an external WSDL of the form defines a schema import using an absolute path, i.e. something of the form <xsd:import namespace="urn:some-namespace" schemaLocation="//absolute/path/to/XSD.xsd"/> ExternalResolver tries to treat this import as a local resource and fails. Shouldn't it rather try to compose the URL from the endpoint used in the initial WSDL request and the path to the XSD?

I've tried to do this using my own Resolver (as I also have to use basic HTTP authentication to access this private WSDL), and I had to also override setting baseDir, since in this case after updatectx() baseDir contains the '//absolute/path/to' path so just appending input to baseDir results in a wrong URL.

The code I'm referring to is here.