title: SOAP Authentication issue
body: <p>I'm having authentication issues with the SOAP server I'm trying to connect to.</p>
  
  <p>I need to use this address for retreiving the wsdl info
  <code>https://profitweb.afasonline.nl/profitservices/updateconnector.asmx?wsdl</code></p>
  
  <p>When I enter this address in the browser, a username and password is asked. Filling in my username and password, the WSLD XML is shown.</p>
  
  <p>So, I'm using this peace of PHP code</p>
  
  <pre><code>$wsdl = "https://profitweb.afasonline.nl/profitservices/updateconnector.asmx?wsdl";
  $url = "https://profitweb.afasonline.nl/profitservices/updateconnector.asmx";
  $login = 'username';
  $password = 'password';
  
  $client = new SoapClient( $wsdl, array('login' =&gt; $login, 'password' =&gt; $password));
  </code></pre>
  
  <p>But then I get the following error:</p>
  
  <pre><code>Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://profitweb.afasonline.nl/profitservices/updateconnector.asmx?wsdl' : failed to load external entity "https://profitweb.afasonline.nl/profitservices/updateconnector.asmx?wsdl" in C:\xampp\htdocs\test.nl\soap.php:8 Stack trace: #0 C:\xampp\htdocs\test.nl\soap.php(8): SoapClient-&gt;SoapClient('https://profitw...', Array) #1 {main} thrown in C:\xampp\htdocs\test.nl\soap.php on line 8
  </code></pre>
  
  <p>This doesn't look like a authentication error. However if I download the wsdl file manually, save it local and then use that file for creating a <code>new SoapClient</code>, I'm not getting any errors when initializing the SoapClient.</p>
  
  <p>But if I then do a request</p>
  
  <pre><code>$client-&gt;__doRequest($request, $url, 'Execute', '1');
  </code></pre>
  
  <p>I'm getting this __getLastResponseHeaders</p>
  
  <pre><code>HTTP/1.1 401 Unauthorized ( The server requires authorization to fulfill the request. Access to the Web server is denied. Contact the server administrator. ) WWW-Authenticate: Negotiate WWW-Authenticate: Kerberos WWW-Authenticate: NTLM Connection: Keep-Alive Pragma: no-cache Cache-Control: no-cache Content-Type: text/html Content-Length: 3184
  </code></pre>
  
  <p>So that's giving me the idea that I'm running into authentication issues! Read a lot of posts already about this issue, but couldn't find the right answer jet!</p>
  
  <p><strong>EDIT</strong>
  Adding this to the options</p>
  
  <pre><code>'trace' =&gt; 1, 'exceptions' =&gt; 0
  </code></pre>
  
  <p>Give's me indeed an authentication error.</p>
  
  <pre><code>Warning: SoapClient::SoapClient(https://profitweb.afasonline.nl/profitservices/updateconnector.asmx?wsdl): failed to open stream: HTTP request failed! HTTP/1.1 401 Unauthorized ( The server requires authorization to fulfill the request. Access to the Web server is denied. Cont in C:\xampp\htdocs\test.nl\soap.php on line 9
  </code></pre>