単純な Hello World XMLRPC サーバーのセットアップを機能させようとしていますが、ブラウザーでテスト URL http://localhost/client/index/を実行すると、応答エラー エラーの解析に失敗しました。
すべての XMLRPC 呼び出しを処理する Rpc コントローラーで
class RpcController extends Zend_Controller_Action
{
public function init()
{
$this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender();
}
public function xmlrpcAction()
{
$server = new Zend_XmlRpc_Server();
$server->setClass('Service_Rpctest','test');
$server->handle();
}
}
XMLRPCサーバーを呼び出すクライアントコントローラーで
class ClientController extends Zend_Controller_Action
{
public function indexAction()
{
$clientrpc = new Zend_XmlRpc_Client('http://localhost/rpc/xmlrpc/');
//Render Output to the view
$this->view->rpcvalue = $clientrpc->call('test.sayHello');
}
}
私の Service_Rpctest 関数で
<?php
class Service_Rpctest
{
/**
* Return the Hello String
*
* @return string
*/
public function sayHello()
{
$value = 'Hello';
return $value;
}
}
私は何が欠けていますか?