Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.6.2
-
Fix Version/s: 1.8.0
-
Component/s: Zend_Soap_Client
-
Labels:None
Description
Zend_Soap_Client throws an exception when PHP SoapClient functions perfectly.
<?php
protected function _getSoapClient()
{
if (!is_null($this->_sessionId)) return $this->_soapClient;
$this->_soapClient = new Zend_Soap_Client("http://api.clickatell.com/soap/webservice.php?WSDL"); // >>1
$result = $this->_soapClient->auth($this->_apiId, $this->_username, $this->_password); // >>2
$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("http://api.clickatell.com/soap/webservice.php?WSDL");
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}
thrown
Please check current trunk version.
SoapClient->_soapCall() method is used now instead of SoapClient->_call() (which is deprecated).
That was changed within
ZF-4381fix and I hope it should work now.ZF-4381fix and I hope it should work now.