title: php SoapClient fails when passed a wsdl with relative path schemas
body: <p>I have the following issue:</p>
  
  <p>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)</p>
  
  <p>My code is as follows:</p>
  
  <pre><code>$wsdl = 'http://myproxy/webservice?wsdl';
  $options = array( /* options */ );
  $client = new SoapClient($wsdl, $options);
  </code></pre>
  
  <p>The schema import part of the wsdl:</p>
  
  <pre><code>&lt;schema xmlns="http://www.w3.org/2001/XMLSchema"&gt;
    &lt;import namespace="http://myprovider/namespace1/namespace1" schemaLocation="schema1.xsd"/&gt;
    &lt;import namespace="http://myprovider/namespace1/namespace2" schemaLocation="schema2.xsd"/&gt;
    &lt;import namespace="http://myprovider/namespace1/namespace3" schemaLocation="schema3.xsd"/&gt;
  &lt;/schema&gt;
  </code></pre>
  
  <p>The Error that I get:</p>
  
  <pre><code>SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://myproxy/webservice?wsdl' : Extra content at the end of the document
  </code></pre>
  
  <p>Research led me to articles such as this:</p>
  
  <p><a href="https://issues.apache.org/jira/browse/AXIS2-484" rel="nofollow">https://issues.apache.org/jira/browse/AXIS2-484</a></p>
  
  <p>From what I can tell, it seems I have two options:</p>
  
  <ul>
  <li>Get my provider to change the schema paths to absolute</li>
  <li>Get my provider to give me a copy of the schema so I can host on my server where the <code>SoapClient</code> is being called from</li>
  </ul>