ZF-2872: Zend_XmlRpc_Server throws an exception "Calling parameters do not match signature" with base64

Issue Type: Bug Created: 2008-03-13T01:13:59.000+0000 Last Updated: 2008-03-21T17:34:14.000+0000 Status: Resolved Fix version(s): - 1.5.1 (25/Mar/08)

Reporter: Sergej Kurakin (realzaza) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_XmlRpc_Server

Related issues: Attachments:


Zend_XmlRpc_Server throws an exception "Calling parameters do not match signature" with base64.

Code to illustrate

<pre class="highlight">
 * Enter description here...
 * @param base64 $data
 * @return base64

public function setAvatar($data) {
    return $data;

<pre class="highlight">
$client = new Zend_XmlRpc_Client(".");

$avatar = array(
    'type' => 'base64',
    'value' => file_get_contents('avatar.jpg')
$response = $client->call("setAvatar", array($avatar)); 

From XML-RPC server we got error "Calling parameters do not match signature", and if we change @param base64 $data to @param string $data no error happens.

I've watched code, so here is my opinion on this Issue:

One part of issue is in Zend_XmlRpc_Request, in loadXml method. It's parses XML to params (protected member $_params) and saves them as native PHP array with native PHP types. So at this part information about base64 in RPC request is lost.

Second part of this Issue is in Zend_XmlRpc_Server, in _handle method. It's uses params array from Request (Zend_XmlRpc_Request, witch has native PHP types) and compares them with RPC method's Reflection data (where it has base64). Here we got this "Calling parameters do not match signature".

Possibly, fixing issue in Zend_XmlRpc_Request->loadXml and tiny fixes for all Zend_XmlRpc_Request to store data about requested param's types should solve this issue, but I'm not sure about depended Zend_XmlRpc functionality.


Posted by Matthew Weier O'Phinney (matthew) on 2008-03-21T15:27:47.000+0000

Fixed in trunk and 1.5 release branch

Posted by Wil Sinclair (wil) on 2008-03-21T17:34:14.000+0000

I'm assuming this fix is merged to the 1.5 release branch for release with 1.5.1. Please update JIRA if this is not the case.

Have you found an issue?

See the Overview section for more details.


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

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