I have the following issue:
The instantiation of my SoapClient object fails when I pass it a wsdl that imports a schema using relative paths. (I believe this is the case anyway, based on my research)
My code is as follows:
$wsdl = 'http://myproxy/webservice?wsdl';
$options = array( /* options */ );
$client = new SoapClient($wsdl, $options);
The schema import part of the wsdl:
<schema xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://myprovider/namespace1/namespace1" schemaLocation="schema1.xsd"/>
<import namespace="http://myprovider/namespace1/namespace2" schemaLocation="schema2.xsd"/>
<import namespace="http://myprovider/namespace1/namespace3" schemaLocation="schema3.xsd"/>
</schema>
The Error that I get:
SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://myproxy/webservice?wsdl' : Extra content at the end of the document
Research led me to articles such as this:
https://issues.apache.org/jira/browse/AXIS2-484
From what I can tell, it seems I have two options:
- Get my provider to change the schema paths to absolute
- Get my provider to give me a copy of the schema so I can host on my server where the
SoapClient
is being called from