title: SOAP-ERROR: Parsing WSDL: Couldn't find <definitions> in
body: <p>I'm trying to consume a SOAP webservice from a distant server, the wsdl file is located here <a href="http://ecolinthcm.pi-asp.de/logaserver/services/UsersService?wsdl" rel="nofollow noreferrer">http://ecolinthcm.pi-asp.de/logaserver/services/UsersService?wsdl</a></p>
  
  <p>I've been in touch with the developers there but they keep telling me that it works fine so they're not of great help...</p>
  
  <p>I'm using this little piece of code to poke the bear see if it's alive :</p>
  
  <pre><code>$WSDL = "http://ecolinthcm.pi-asp.de/logaserver/services/UsersService?wsdl";
  
  // the file_get_contents methods doesn't change the end result unfortunately
  //$data = file_get_contents($WSDL);
  //file_put_contents('./wsdl.xml',$data);
  //$WSDL = './wsdl.xml';
  
  $opts = array(
      'http'=&gt;array(
          'user_agent' =&gt; 'PHPSoapClient'
          )
      );
  
  $context = stream_context_create($opts);
  
  $service = new SoapClient($WSDL,array('stream_context' =&gt; $context, 'cache_wsdl' =&gt; WSDL_CACHE_NONE));
  $result = $service-&gt;ErmUserBean (array("UserID","Password","TargetUserID"));
  print '&lt;pre&gt;';
      var_dump($result);
  print '&lt;/pre&gt;';
  </code></pre>
  
  <p>As said in the title I get this message in return :</p>
  
  <blockquote>
    <p>Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't find &lt; definitions > in 'WSDL file URI' in C:\Users\username\Documents\EasyPHP-DevServer-14.1VC11\data\localweb\projects\API\index.php:30 Stack trace: #0 C:\Users\username\Documents\EasyPHP-DevServer-14.1VC11\data\localweb\projects\API\index.php(30): SoapClient->SoapClient('WSDL file URI', Array) #1 {main} thrown in C:\Users\username\Documents\EasyPHP-DevServer-14.1VC11\data\localweb\projects\API\index.php on line 30</p>
  </blockquote>
  
  <p>I've read most post about this errors and therefore tried a lot of variation in my SOAP request. I've also edited my php.ini file so that the line </p>
  
  <blockquote>
    <p>extension=php_openssl.dll</p>
  </blockquote>
  
  <p>appears without ";" (comment) before as I could read <a href="https://stackoverflow.com/questions/11082889/soap-error-parsing-wsdl-couldnt-load-from">here</a>.</p>