Zend Framework

Exception thrown when using default Zend_Soap_Client with WSDL, not with PHP SoapClient

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major 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

Activity

Hide
Alexander Veremyev added a comment -

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.

Show
Alexander Veremyev added a comment - 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.
Hide
Alexander Veremyev added a comment -

Fixed with ZF-4381

Please reopen issue if problem still exists.

Show
Alexander Veremyev added a comment - Fixed with ZF-4381 Please reopen issue if problem still exists.
Hide
Matthieu added a comment -

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)

Show
Matthieu added a comment - 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)
Hide
Jan Pieper added a comment -

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

Show
Jan Pieper added a comment - Please take a look at ZF-9285 to find out what is causing this problem.

People

Vote (1)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: