Hi there,

so this is basically my code:

<?php
require_once "Zend/Loader.php";
Zend_Loader::registerAutoload();

function version() {
        return 1;
}

function get_contact($id) {
        return 42;
}

$server = new Zend_XmlRpc_Server();
$server->addFunction('get_contact');
$server->addFunction('version');
echo $server->handle();


I use xmlrpc (http://xmlrpc-c.sourceforge.net/) to test the server, basically it's

xmlrpc http://localhost/zend_xmlrpc.php version

which returns:

Result:
Integer: 1

so far so good. But I'm unable to call the get_contact function, because it's always saying:

Error: RPC failed at server. Calling parameters do not match signature (623)

So, first thought was: maybe a broken client. So I tried the Zend_XmlRpc_Client:

<?php
require_once "Zend/Loader.php";
Zend_Loader::registerAutoload();

$client = new Zend_XmlRpc_Client('http://localhost/zend_xmlrpc.php');
echo $client->call('get_contact', array("sth"));


didn't work either. So what am I doing wrong?

I'm using Zend Framework Revision 11997 and PHP 5.2.6.

Regards
        Matthias

Reply via email to