title: Check if a PHP-based SOAP server is FULLY woking
body: <p>I have a SOAP-Server problem driving me nuts from a couple of days. I have a very simple SOAP-Client PHP script interrogating a simple SOAP-Server PHP script as well.</p>
  
  <p>I have an exact copy of these scripts on my debug server and they work perfecly (it's just a hello World function) but on production seems there's no way to getting a response from soap-server from soap-client. I keep getting "Procedure 'ns1:testHello' not present" error (testHello is the function name). </p>
  
  <p>I know production-client is working because if I make a call from production server to develop WSDL it works perfectly. I do think it's somehow correlated with SOAP server but how can I exaclty know if it's working properly and what's Wrong? </p>
  
  <p>If I take a look infophp() dump I see both SOAP server and client are enabled</p>
  
  <pre><code>Soap Client     enabled
  Soap Server     enabled 
  
  Directive   Local Value Master Value
  soap.wsdl_cache 1   1
  soap.wsdl_cache_dir /tmp    /tmp
  soap.wsdl_cache_enabled 0   1
  soap.wsdl_cache_limit   5   5
  soap.wsdl_cache_ttl 0   86400
  </code></pre>
  
  <p>I've tried to force both SOAP_1_1 and SOAP_1_2 versions but no changes.
  I've tried disabling every kind of cache but no changes as well.
  I've read that "ns:X function not present" is usually dued to a WSDL misconfiguration but how can It be wrong if it's an exact copy (except for targetNamespace, xmlns:tns and soap:address urls pointing to the production server)</p>
  
  <p><strong>I'm starting to think that is somehow correlated to some web server configuration settings. Any ideas? What kind of tests can I do?</strong></p>
  
  <p>Thanx a lot in advance.</p>
  
  <p>My SERVER code:</p>
  
  <pre><code>    ini_set("display_errors", "off");
      ini_set("soap.wsdl_cache_enabled", 0);
      ini_set('soap.wsdl_cache_ttl',0);
  
      $wsdl_url="http://SITE_URL/test.wsdl";
  
  
      function testHello($functionName){
          $return = "Hello, ".$functionName;
        return $return;
      } 
  
      $server= new SoapServer($wsdl_url, array('cache_wsdl' =&gt; WSDL_CACHE_NONE));
      $server-&gt;addFunction("testHello");
      $server-&gt;handle();
  </code></pre>
  
  <p>My client code</p>
  
  <pre><code>ini_set("soap.wsdl_cache_enabled", 0);
  ini_set('soap.wsdl_cache_ttl',0);
  ini_set("display_errors", "on");
  
  $wsdl_url="http://SITE_URL/test.wsdl";
  
  $client=new SoapClient($wsdl_url , array('cache_wsdl' =&gt; WSDL_CACHE_NONE));
  
  try{
    $t = $client-&gt; testHello("Test");
    var_dump($t);
  } catch(SoapFault $e){
    var_dump($e);
  }
  </code></pre>
  
  <p>My WSDL file</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
  
  &lt;definitions name="TLN"
               targetNamespace="http://SITE_URL/test.wsdl"
               xmlns:tns="http://SITE_URL/test.wsdl"
               xmlns:xsd="http://www.w3.org/2001/XMLSchema"
               xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
               xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
               xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
               xmlns="http://schemas.xmlsoap.org/wsdl/"&gt;
  
       &lt;message name="testHelloRequest"&gt;
          &lt;part name="functionName" type="xsd:string"/&gt;
      &lt;/message&gt;
  
      &lt;message name="testHelloResponse"&gt;
          &lt;part name="return" type="xsd:string"/&gt;
      &lt;/message&gt;
  
      &lt;portType name="testHelloPortType"&gt;
          &lt;operation name="testHello"&gt;
              &lt;input message="tns:testHelloRequest" /&gt;
              &lt;output message="tns:testHelloResponse" /&gt;
          &lt;/operation&gt;
      &lt;/portType&gt;
  
     &lt;binding name="testHelloBinding" type="tns:testHelloPortType"&gt;
          &lt;soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" /&gt;
          &lt;operation name="testHello"&gt;
              &lt;soap:operation soapAction="" /&gt;
  
              &lt;input&gt;
                  &lt;soap:body use="encoded" namespace="" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /&gt;
              &lt;/input&gt;
              &lt;output&gt;
                  &lt;soap:body use="encoded" namespace="" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" /&gt;
              &lt;/output&gt;
          &lt;/operation&gt;
      &lt;/binding&gt;
  
      &lt;documentation&gt;testHello&lt;/documentation&gt;
  
      &lt;service name="testHelloService"&gt;
          &lt;port name="testHelloPort" binding="testHelloBinding"&gt;
              &lt;soap:address location="http://SITE_URL/server.php" /&gt;
          &lt;/port&gt;
      &lt;/service&gt;       
  
  
  &lt;/definitions&gt;
  </code></pre>