[英]Zend_XmlRpc :Failed to parse response error
Am trying to get a simple hello world XMLRPC server setup to work.However I get this Failed to parse response error error when I run the test URL http://localhost/client/index/ on my browser 我试图让一个简单的hello world XMLRPC服务器设置正常工作。但是,在浏览器上运行测试URL http:// localhost / client / index /时 ,我无法解析响应错误错误
In my Rpc Controller that handles all my XMLRPC calls 在处理我所有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();
}
}
In my client Controller that calls the XMLRPC Server 在我的客户端控制器中调用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');
}
}
In my Service_Rpctest function 在我的Service_Rpctest函数中
<?php
class Service_Rpctest
{
/**
* Return the Hello String
*
* @return string
*/
public function sayHello()
{
$value = 'Hello';
return $value;
}
}
What am I missing? 我想念什么?
您发送xml输出:
echo $server->handle();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.