Issues

ZF-11357: Error when overriding Zend Framework Soap Client __call method

Issue Type: Bug Created: 2011-05-10T17:25:36.000+0000 Last Updated: 2011-05-10T17:28:00.000+0000 Status: Open Fix version(s): Reporter: Ziad Mannan (ziadmannan) Assignee: Alexander Veremyev (alexander) Tags: - Zend_Soap_Client

  • soap
  • zend_soap,
  • zend_soap_client

Related issues: Attachments:

Description

Hi,

I am extending Zend_Soap_Client and overriding it's __call method just to allow me to do some mundane data preparation before I call the SOAP method but I keep getting an Exception from the server. If I make the same call without overriding the __call it works fine. I don't understand why overriding the __call method is causing this problem. I've checked that the data and the SOAP client object in both cases are exactly the same but it just doesn't seem to work when overriding __call. Any ideas?

Code that doesn't work:

<pre class="highlight">
public function __call($method, $data) {

    $timestamp = date('c');
    $otherData = array(
        'timeStamp' => $timestamp,
        'apiVersion' => $this->apiVersion,
        'clientSoftwareVersion' => $this->clientSoftwareVersion,
    );
    $requestData = array_merge($otherData, $data[0]);

    return parent::__call($method, $requestData);

}

Code that works:

<pre class="highlight">
public function feeLookup($data) {

    $timestamp = date('c');
    $otherData = array(
        'timeStamp' => $timestamp,
        'apiVersion' => $this->apiVersion,
        'clientSoftwareVersion' => $this->clientSoftwareVersion,
    );
    $requestData = array_merge($otherData, $data);

    return parent::feeLookup($requestData);

}

Exception that I get from the server:

<pre class="highlight">
SoapFault: java.util.EmptyStackException

Thanks Ziad

Comments

No comments to display

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts