All pastes #2049482 Raw Edit

Miscellany

public php v1 · immutable
#2049482 ·published 2011-04-22 21:24 UTC
rendered paste body
############## rpc_client.php$client = new Zend_XmlRpc_Client('http://127.0.0.1:8888/dev_central/ldx/public_html/testing/rpc_server.php');$response = $client->call('say_hello', array('Scarlett Johansson'));print "<p>$response</p>";############## rpc_server.php/*** Returns a welcome phrase.** @param string $name User's name.* @return string A welcome phrase.*/function say_hello($name) {    return "Hello $name!";}$server = new Zend_XmlRpc_Server();$server->addFunction('say_hello');$server->handle();############## PHP error:[22-Apr-2011 17:18:10] PHP Fatal error:  Uncaught exception 'Zend_XmlRpc_Client_FaultException' with message 'Failed to parse response' in /Users/ade/Documents/projects/ZendFramework-1.11.5/library/Zend/XmlRpc/Client.php:381Stack trace:#0 /Users/ade/Documents/projects/dev_central/ldx/public_html/testing/rpc_client.php(8): Zend_XmlRpc_Client->call('say_hello', Array)#1 {main}  thrown in /Users/ade/Documents/projects/ZendFramework-1.11.5/library/Zend/XmlRpc/Client.php on line 381