ZF-4865: Exception thrown when using default Zend_Soap_Client with WSDL, not with PHP SoapClient


Zend_Soap_Client throws an exception when PHP SoapClient functions perfectly.

<?php protected function _getSoapClient() { if (!is_null($this->_sessionId)) return $this->_soapClient; {color:red}
$this->_soapClient = new Zend_Soap_Client(""); // >>1 $result = $this->_soapClient->auth($this->_apiId, $this->_username, $this->_password); // >>2 {color} $result = explode(' ', $result); if ($result[0] == 'OK:') { $this->_sessionId = $result[1]; } else { throw new KiersIt_Exception("Failed to authenticate. Please check your credentials!"); } return $this->_soapClient; }


The 2nd indicated line (>>1) doesn't work: I get an exception (see below), however when I change the 1st indicated line (>>1) to:

$this->_soapClient = new SoapClient("");

it works perfectly.

The Exception: Fatal error: Uncaught SoapFault exception: [SOAP-ENV:Client] Operation '' is not defined in the WSDL for this service in /home/jjkiers/src/bin/.Zend/ZendStudioForEclipse-6.1.0/plugins/org.zend.php.framework.resource_6.1.0.v20080907/resources/ZendFramework_1.6/Zend/Soap/Client.php:887 Stack trace:

0 [internal function]: SoapClient->__call('auth', Array)

1 [internal function]: Zend_Soap_Client_Common->auth(12345, 'username', 'password')

2 /home/jjkiers/src/bin/.Zend/ZendStudioForEclipse-6.1.0/plugins/org.zend.php.framework.resource_6.1.0.v20080907/resources/ZendFramework_1.6/Zend/Soap/Client.php(887): call_user_func_array(Array, Array)

3 [internal function]: Zend_Soap_Client->__call('auth', Array)

4 /home/jjkiers/src/Zend/workspaces/DefaultWorkspace/Codelib/KiersIt/Sms/Adapter/Clickatell.php(143): Zend_Soap_Client->auth(12345, 'username', 'password')

5 /home/jjkiers/src/Zend/workspaces/DefaultWorkspace/Codelib/KiersIt/Sms/Adapter/Clickatell.php(163): KiersIt_Sms_Adapter_Clickatell->_getSoapClient()

6 /home/jjkiers/src/Zend/workspaces/DefaultWorkspace/Codelib/test.php(20): KiersIt_Sms_Adapter_Clickatell->getCharge('2a41c19703b7dcd...')

7 /tmp/dummy.php(1): include('/home/jjkiers/s...')

8 {main}



Please check current trunk version.

SoapClient->__soapCall() method is used now instead of SoapClient->__call() (which is deprecated). That was changed within [ZF-4381] fix and I hope it should work now.

Fixed with ZF-4381

Please reopen issue if problem still exists.

I have updated my Framework to 1.7.8 and patch it with the fix (new Zend/Soap/Client.php in ZF-4381) but the problem still exists ! In the mean time (until this issue is fix), I use SoapClient (which works perfectly)

Please take a look at ZF-9285 to find out what is causing this problem.