Domanda

Sto cercando di ottenere una semplice configurazione del server Hello World XMLRPC. Impossibile analizzare l'errore di risposta Errore quando eseguo l'URL di provahttp: // localhost/client/indice/ Sul mio browser

Nel mio controller RPC che gestisce tutte le mie chiamate XMLRPC

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();
    }
}

Nel mio controller client che chiama XMLRPC Server

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');
    }
}

Nella mia funzione Service_Rpctest

<?php
class Service_Rpctest
{
    /**
    * Return the Hello String
    * 
    * @return string
    */  
    public function sayHello()
    {
        $value = 'Hello';
        return $value;
    }

}

Cosa mi manca?

Nessuna soluzione corretta

Altri suggerimenti

Invia l'output XML:

echo $server->handle();
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top