SoapClient php error while transmitting wsdl with relative path schemes

I have the following problem:

The implementation of my SoapClient object fails when I pass wsdl to it, which imports the schema using relative paths. (I believe that one way or another, based on my research)

My code is as follows:

$wsdl = 'http://myproxy/webservice?wsdl';
$options = array( /* options */ );
$client = new SoapClient($wsdl, $options);

Part of importing a wsdl schema:

<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 I am getting is:

SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://myproxy/webservice?wsdl' : Extra content at the end of the document

The study led me to the following articles:

https://issues.apache.org/jira/browse/AXIS2-484

From what I can say, it seems that I have two options:

  • Ask my provider to change the path of the scheme to absolute
  • Ask my provider to provide me with a copy of the scheme so that I can place on my server where it SoapClientis called from
+1
1

.

, SoapClient wsdl , :

http://myproxy/schema1.xsd

xsd, SoapClient.

, -, . :

php SoapClient -

+1

All Articles