You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-users@xml.apache.org by Lachlan Donald <la...@ljd.cc> on 2002/12/04 14:03:07 UTC

Accessing Xindice-CVS via XMLRPC

I have spent the evening searching the mailing list archives trying to track
down how to access Xindice (from tomcat) via XMLRPC. In 1.0 I used the
plugin and then made calls to methods like db.ListCollections.

I dug through the source code for the XMLRPC component and saw all of the
classes for individual commands under rpc/messages, but I can't for the life
of me get them working.

I have been doing my debugging with this web based xmlrpc interface:

http://www.dscpl.com.au/xmlrpc-debugger.php

I am using a server name of http://myserver.fulldomain.com:8080/Xindice

When ever I call, for instance db.ListCollections, I get back a this
response:

java.lang.NoSuchMethodException: db.ListCollections

I am using PHP, so my options are limited in terms of accessing xindice, so
I am obviously very keen to get this working. If you guys could tell me what
I am doing wrong (I am sure its something small) I would be very grateful.

I was also thinking that once I got this working I would write some code for
a system.listMethods method, so that people can always use the introspection
features of XMLRPC rather than stabbing around in the dark like I have been
:)

Cheers,
Lachlan Donald


NullPointerException returned from Query

Posted by Lachlan Donald <la...@ljd.cc>.
I am accessing the cvs version using XML RPC and everything works great
except for when I call the Query method, for instance for an XPath query or
an XUpdate query,

I always get the following response:

java.lang.Exception: java.lang.NullPointerException

My two questions are


RE: Accessing Xindice-CVS via XMLRPC

Posted by Dave Viner <dv...@yahoo-inc.com>.
the xmlrpc api has changed considerably in 1.1b.  Here's a short perl script
that lists the collection under /db.

BUT... be warned that the code in CVS is not yet released, and is subject to
change.

#!/usr/local/bin/perl -w

use strict;
use Frontier::Client;
use Data::Dumper;
use XML::Parser;

my($server,$result,$url);

$url = 'http://localhost:8080/xindice-1.1b';
print "Hello World!\n";
$server = Frontier::Client->new('url'=>$url,'debug'=>0);
## try listing the collections
## look at org/apache/xindice/server/rpc/messages/*.java
## for the 'message' possibilities.  The parameters are there as well.

my $args = {};
$args->{'message'} = 'ListCollections';
$args->{'collection'} = '/db';
$result = $server->call('run',$args);
print "\nresult returned:\n";
print Dumper($result);
exit;


dave.

-----Original Message-----
From: Lachlan Donald [mailto:lachlan@ljd.cc]
Sent: Wednesday, December 04, 2002 5:03 AM
To: xindice-users@xml.apache.org
Subject: Accessing Xindice-CVS via XMLRPC


I have spent the evening searching the mailing list archives trying to track
down how to access Xindice (from tomcat) via XMLRPC. In 1.0 I used the
plugin and then made calls to methods like db.ListCollections.

I dug through the source code for the XMLRPC component and saw all of the
classes for individual commands under rpc/messages, but I can't for the life
of me get them working.

I have been doing my debugging with this web based xmlrpc interface:

http://www.dscpl.com.au/xmlrpc-debugger.php

I am using a server name of http://myserver.fulldomain.com:8080/Xindice

When ever I call, for instance db.ListCollections, I get back a this
response:

java.lang.NoSuchMethodException: db.ListCollections

I am using PHP, so my options are limited in terms of accessing xindice, so
I am obviously very keen to get this working. If you guys could tell me what
I am doing wrong (I am sure its something small) I would be very grateful.

I was also thinking that once I got this working I would write some code for
a system.listMethods method, so that people can always use the introspection
features of XMLRPC rather than stabbing around in the dark like I have been
:)

Cheers,
Lachlan Donald