RE: [PEAR] PEAR::XML_RPC

From: Date: Thu, 10 Jul 2003 06:01:34 +0000
Subject: RE: [PEAR] PEAR::XML_RPC
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-6548@lists.php.net to get a copy of this message
Are you using PHP 5 for this ? (from the file extension) Arnaud. > I'm trying to learn and use PEAR::XML_RPC. I was able to get > a client > to hook-up to one of the userland services just fine. Now > I'm writing a > very simple custom xmlrpc server. I can't seem to get the server to > pass the request to the appropriate function. Here is what I have: > > require_once 'XML/RPC/Server.php'; > > function XMLRPC_Handler($params) { > XML_RPC_Server_debugmsg('here now'); > return new XML_RPC_Response(new XML_RPC_Value('Hello > World', 'string')); > } > > $XMLRPCServer = new XML_RPC_Server(array('AA.authenticate' => > array('function' => 'XMLRPC_Handler'))); > > > The fault I got is: > > XML error: no element found at line 1 > > My client looks like this; > > require_once 'XML/RPC.php'; > > $f=new XML_RPC_Message('AA.authenticate'); > $c=new XML_RPC_Client('/A_and_A/service/XMLRPC_index.php5', > 'localhost', > 80); > $r=$c->send($f); > if ($r->faultCode()) { > print "Fault: \n"; > print "Code: " . $r->faultCode() . > " \nReason '" .$r->faultString()."'<BR>"; > exit; > } > $v=$r->value(); > print $v->scalarval(); > htmlentities($r->serialize()); > > What obviously simple thing am I missing? > > --Tony > > > -- > PEAR General Mailing List (http://pear.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.pear.general (#6548) next »