title: Zend Soap Server with wsdl autodiscovery doesn't work as expected
body: <p>Duplicate of <a href="https://stackoverflow.com/questions/1907358/zf-1-9-6-zend-soap-function-dostring-is-not-a-valid-method-for-this-service">this question</a></p>
  
  <p>I'm trying to create a web service with Zend_Soap_Server in wsdl autodiscovery mode, but I obtain very strange effects... here the code:
  server:</p>
  
  <pre><code>&lt;?php
  require_once('Zend/Soap/AutoDiscover.php');
  require_once('Zend/Soap/Server.php');
  require_once('Zend/Soap/Wsdl.php');
  require_once('library/SoapActions.php');
  $wsdl = new Zend_Soap_Autodiscover();
  $wsdl-&gt;setClass('SoapActions');
  if (isset($_GET['wsdl'])) {
  $wsdl-&gt;handle();
      } else {
      $server = new Zend_Soap_Server('http://localhost:8083/server.php?wsdl');
      $server-&gt;setClass('SoapActions');
      $server-&gt;setEncoding('ISO-8859-1');
      $server-&gt;handle();
      }
  </code></pre>
  
  <p>SoapActions class:</p>
  
  <pre><code>class SoapActions {
  
  /**
   * Test function
   * 
   * @param String $a
   * @param String $b
   * @return String
   */
   public function test1($a, $b) {
      return "you passed me ".$a." ".$b;
   }
  
   /**
   * Test function 2
   * 
   * @param String $a
   * @param String $b
   * @return String
   */
   public function test2($a, $b) {
      return "you passed me ".$a." ".$b;
   }
  </code></pre>
  
  <p>}</p>
  
  <p>I tried to use the function test1 and test2 using the Zend_Soap_Client class, here the code:</p>
  
  <pre><code>require_once('Zend/Soap/Client.php');
      $client = new Zend_Soap_Client("http://localhost:8083/server.php?wsdl");
  
      try {
          echo $client-&gt;test2("foo","bar"); //this works!
      } catch (Exception $e) {
          echo $e;
      }
  
      try {
          echo $client-&gt;test1("foo","bar"); //this doesn't work!
      } catch (Exception $e) {
          echo $e;
      }
  </code></pre>
  
  <p>I cannot understand because the test2 function works as expected, the test1 function return the following exception:</p>
  
  <blockquote>
    <p>SoapFault exception: [Sender] Function
    ("test1") is not a valid method for
    this service in
    /usr/local/zend/share/ZendFramework/library/Zend/Soap/Client.php:1121
    Stack trace:
    0 /usr/local/zend/share/ZendFramework/library/Zend/Soap/Client.php(1121):
    SoapClient->__soapCall('test1', Array,
    NULL, NULL, Array)
    1 /usr/local/zend/apache2/htdocs/webservice/client.php(6):
    Zend_Soap_Client->__call('test1',
    Array)
    2 /usr/local/zend/apache2/htdocs/webservice/client.php(6):
    Zend_Soap_Client->test1('foo', 'bar')
    3 {main}</p>
  </blockquote>
  
  <p>I tried to invert the functions name... the result is incredible, works only test2! I'm getting crazy, it seems that somewhere on server side it save the function name... </p>
  
  <p>Can someone help me?</p>