Perhaps this is a case of trying to hitting a nail with a sledgehammer, I dunno. I simply want to expose a single method to handle only one xmlrpc. Basically, this is implementing pingback functionality of blog software. The XmlRpc request looks like this:

<?xml version="1.0"?>
<methodCall>
<methodName>pingback.ping</methodName>
<params>
<param><value><string>http://xxx.dev/wordpress/?p=14</string></value></param>
<param><value><string>http://yyy.dev/blog/2007/07/18/test-test-test</string></value></param>
</params></methodCall>



My rpc controller looks like this:


//url: /blog/rpc/pingback
class Blog_RpcController extends Blog_AbstractController
{

    public function pingbackAction()
    {
        $this->_helper->ViewRenderer->setNoRender();
        $this->_helper->LayoutManager->useLayoutName(false);

        $server = new Zend_XmlRpc_Server();
        $server->setClass('Blog_RpcController', 'pingback');
        $server->handle();
    }

    public function ping($var1, $var2)
    {
        // what here?
    }

}


Is this even in the right direction of being the correct way to handle this? I don't see any docs on exposing a single function as a specific namespace/methodname call.

Is there a better way to implement a single method call as such over xmlrpc?


Reply via email to