2009年1月21日星期三

[fw-webservices] Problem with Zend_XmlRpc_Client

I had set up an XML-RPC client for using a demo service of the XML-RPC server
on the Zend Framework website, and I instantiated it and use the call()
instance method.

What I had done is given below


<?php

class IndexController extends Zend_Controller_Action
{
function init()
{

Zend_Loader::loadClass('Zend_XmlRpc_Client');

}

function indexAction()
{
$client = new Zend_XmlRpc_Client('http://framework.zend.com/xmlrpc');
echo $client->call('test.sayHello');


$this->_helper->viewRenderer->setNoRender();
}


}//CLASSS


When I Run this controller in my local host, I get Error message just like
the following


Fatal error: Uncaught exception 'Zend_XmlRpc_Client_FaultException' with
message 'Invalid response' in
D:\xampp\htdocs\zendweb\library\Zend\XmlRpc\Client.php:348 Stack trace: #0
D:\xampp\htdocs\zendweb\application\controllers\IndexController.php(14):
Zend_XmlRpc_Client->call('test.sayHello') #1
D:\xampp\htdocs\zendweb\library\Zend\Controller\Action.php(503):
IndexController->indexAction() #2
D:\xampp\htdocs\zendweb\library\Zend\Controller\Dispatcher\Standard.php(285):
Zend_Controller_Action->dispatch('indexAction') #3
D:\xampp\htdocs\zendweb\library\Zend\Controller\Front.php(934):
Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http),
Object(Zend_Controller_Response_Http)) #4
D:\xampp\htdocs\zendweb\index.php(48): Zend_Controller_Front->dispatch() #5
{main} thrown in D:\xampp\htdocs\zendweb\library\Zend\XmlRpc\Client.php on
line 348


What's wrong in my code, pls help ....


--
View this message in context: http://www.nabble.com/Problem-with-Zend_XmlRpc_Client-tp21598685p21598685.html
Sent from the Zend Web Services mailing list archive at Nabble.com.

没有评论: