title: PHP - SOAP-ENV:ClientBad Request after SoapServer->Handle() - Help
body: <p>I got a PHP web service that had been running great for a long time, but somewhere a long the way it some how stopped working, and I just can't get it to work again.</p>
  
  <p>I got some php page in which all I do is define a class with functions, and in the end of it I create the SoapServer. </p>
  
  <p>It looks like this - </p>
  
  <pre><code>class MyClassWS
  {
       function .....
       function ....
  }
  ini_set("soap.wsdl_cache_enabled", "0");
      error_log("Server after ini_set");
      $soapserver = new SoapServer("MyWSDL.wsdl");
  
      error_log("Server after new SoapServer");
  $soapserver-&gt;setClass("MyClassWS");
      error_log("Server after setClass");
      //error_log(print_r($soapserver-&gt;getFunctions()));
  
      try
      {
          $soapserver-&gt;handle();
      }
      catch(Exception $ex)
      {
          error_log("Exception!".$ex-&gt;getMessage());
  
      }
  error_log("Finished Handling",0);
  </code></pre>
  
  <p>Right after the $soapserver->handle(); the code terminates, and I get a  vague "SOAP-ENV:ClientBad Request" result on my web page.</p>
  
  <p>This happens when I "require_once" this page, from my index page, so I could call functions that are defined in this class, from my index page.</p>
  
  <p>My guess is that maybe I've been fiddling too much with my WSDL and somehow it screwed up my while WebService, but I tried looking on what's wrong with it, but couldn't get onto anything. Especially because of this annoying vague error message, that doesn't really help.</p>
  
  <p>Thanks!</p>