title: Problem connecting to a SOAP API in password protected directory
body: <p>I am trying to access a Magento API, using SOAP. the code I have works fine normally, however the client wishes to password protect the Magento main folder. Doing so breaks access to the API and causes an error.</p>
  
  <p>The documentation suggests this isnt a problem and you can just specify the username/password, however this does not work. </p>
  
  <p>I am using PHP and IIS, with the password protection set up via Plesk 10. Does this use Basic HTTP authentication or something else?</p>
  
  <p>My access code is:</p>
  
  <pre><code>$client = new SoapAuthClient($GLOBALS["magento_api_path"],array(  
  
                              'login'=&gt;"admin", 
                              'password'=&gt;"password" 
                            ) 
                      ); 
  $session = $client-&gt;login($GLOBALS["magento_api_user"], $GLOABLS["magento_api_password"] ,
                      array(  
  
                              'login'=&gt;"admin", 
                              'password'=&gt;"password" 
                            ) ); 
  </code></pre>
  
  <p>The error I get is:</p>
  
  <pre><code>Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://www.domain.co.uk/magento/index.php/api/index/index/wsdl/1/' : failed to load external entity "http://www.domain.co.uk/magento/index.php/api/index/index/wsdl/1/" in C:\Inetpub\vhosts\domain.co.uk\httpdocs\backend\index.php:20 Stack trace: #0 C:\Inetpub\vhosts\domain.co.uk\httpdocs\backend\index.php(20): SoapClient-&gt;__call('login', Array) #1 C:\Inetpub\vhosts\domain.co.uk\httpdocs\backend\index.php(20): SoapClient-&gt;login('backenduser', 'backendwebuser', Array) #2 {main} thrown in C:\Inetpub\vhosts\domain.co.uk\httpdocs\backend\index.php on line 20
  </code></pre>
  
  <p>The line referred to is the $client->login command.</p>
  
  <p>Any suggestions?</p>