title: Fatal error: Uncaught SoapFault exception: [WSDL]
body: <p>I'm having trouble calling a web service I've set up from PHP. The obfuscated adress <code>http://XXX.XXX.XXX.XXX/test.asmx?wsdl</code> in the error message below returns a valid WSDL. I've successfully tried to call it as a web service using a VB.net client, but when I call it from PHP on Debian I get the following message:</p>
  
  <pre>
  Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL:
    Couldn't load from 'http://XXX.XXX.XXX.XXX/test.asmx?wsdl'
    in /var/www/domain/mywebsite.com/public_html/catalog/fomeus/orders.php:101
  
  Stack trace:
    #0 /var/www/domain/mywebsite.com/public_html/catalog/fomeus/orders.php(101):
      SoapClient->SoapClient('http://XXX.XXX.XXX.XXX/', Array) #1 {main} thrown
      in /var/www/domain/mywebsite.com/public_html/catalog/fomeus/orders.php
      on line 101
  </pre>
  
  <p>What could the problem be? I've included my code for the web service and the PHP client below.</p>
  
  <p><strong>Web Service:</strong></p>
  
  <pre><code>Imports System.Web.Services
  Imports System.Web.Services.Protocols
  Imports System.ComponentModel
  ...
  ' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
  ' &lt;System.Web.Script.Services.ScriptService()&gt; _
  &lt;System.Web.Services.WebService(Namespace:="http://tempuri.org/")&gt; _
  &lt;System.Web.Services.WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)&gt; _
  &lt;ToolboxItem(False)&gt; _
  Public Class WebService1
  Inherits System.Web.Services.WebService 
      &lt;WebMethod()&gt; _
      Public Function HelloWorld() As String
          Return "Hello World"
      End Function
  End Class
  </code></pre>
  
  <p><strong>PHP client:</strong></p>
  
  <pre><code>require_once($_SERVER['DOCUMENT_ROOT']."/catalog/fomeus/includes/soap/nusoap.php");
  
  $objClient = new soapclient("http://XXX.XXX.XXX.XXX/test.asmx?wsdl",
      array('trace' =&gt; 1, 'exception' =&gt; 0, 'cache_wsdl' =&gt; 0));
  
  print_r($objClient -&gt; HelloWorld());
  </code></pre>
  
  <p>I'm using PHP version 5.2.6 if that's of any help. I've been going through plenty of posts in different forums trying to figure out what the problem is. Many people have had the same issue, but none of the solutions I've found so far work for me. Any help would be greatly appreciated.</p>