Hi,

    here's some code for calling queryDocument.  the code should allow for both xpath and xupdate.  you can also find more php xindice client code at sourceforge http://sourceforge.net/projects/phpxindice/

 

dave

 

function _communicate($server,$port,$collection,$msgStr,$msgArray,$debug=0)
{
$client = new xmlrpc_client($collection, $server,$port);
$rpcmsg = new xmlrpcmsg($msgStr,$msgArray);
if($debug != 0)
$client->setDebug(1);
$result = $client->send($rpcmsg);
if($result == 0)
return $client->errstr;
if(!$result->faultCode())
return $response = xmlrpc_decode($result->value());
else
return $response = xmlrpc_decode($result->faultString());
}

 

function queryDocument($server, $port, $collection,$key,$type,$query,$debug=0)
{$methodName = "db.queryDocument";
$BlankArray = array();
$paramsArray = array(new xmlrpcval($collection, "string"),
new xmlrpcval($type, "string"),
new xmlrpcval($query, "string"),
new xmlrpcval($BlankArray,"struct"),
new xmlrpcval($key,"string"));
return _communicate($server,$port,$collection,$methodName,$paramsArray,$debug);

}

-----Original Message-----
From: Umesh Rathod [mailto:[EMAIL PROTECTED]
Sent: Friday, June 14, 2002 10:45 AM
To: [email protected]
Subject: XUpdate PHP API

Hi:
        Where can I find PHP API for XUpdate? I searched google but it was of no help.
 
 
Thanks,
Umesh

Reply via email to