title: PHP - Call SoapClient with header, and returns fatal error
body: <p>I am still very new to use php to call the SoapClient. Recently I have a project which I need to call the API from .net using web service SOAP. </p>
  
  <p>I won't able to see the actual XML code of the web service URL provided as it requires header to access, therefore test via POSTMAN, it works well.</p>
  
  <p>However, it doesn't work when using php to call their web service on the localhost server (XAMPP), (other web service address work fine on the code below), not sure where it goes wrong:</p>
  
  <pre><code>  $Auth = array(
  
      'Content-Type' =&gt; 'text/xml',
      'X-RW-Auth-Token' =&gt; '4f931e62-d8c8-439b-a4d7-0c29fc0e3dbe'
  
  );
  
  $client = new SoapClient("https://licensed-ws.ricewarnerdigital.com/process/RiskEngine/v1.0/EndPoint.asmx?wsdl");
  
  $header = new SoapHeader(url,null, $Auth,false);
  
  $client-&gt;__setSoapHeaders($header);
  
  $param = array(
      'RR_AgeNext' =&gt; '30',
      'RR_TermSI' =&gt; '1000000',
      'RR_TPDSI' =&gt; '3000000',
      'RR_AnyOwn' =&gt; 'A'
  );
  
  $GetResponse = $client-&gt;GetQuotationsForParameters($param);
  </code></pre>
  
  <h2>Error:</h2>
  
  <blockquote>
    <p>Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from '...' : failed to load external entity "..." in /Applications/XAMPP/xamppfiles/htdocs/quote-tool/ricewarner_api.php:11 Stack trace: #0 /Applications/XAMPP/xamppfiles/htdocs/quote-tool/ricewarner_api.php(11): SoapClient->SoapClient('<a href="https://license" rel="nofollow">https://license</a>...') #1 {main} thrown in /Applications/XAMPP/xamppfiles/htdocs/quote-tool/ricewarner_api.php on line 11</p>
  </blockquote>