Hello.  I am trying to interface a Delphi application with Xindice via the
XML-RPC module.

First, here is the documentation example I used as the basis for my XML-RPC
message:

To use the API all you really need to do is create an XmlRpcClient that
connects to Xindice via HTTP. Since the default HTTP port for Xindice is
4080 that is what we use here.
        XmlRpcClient  client = new XmlRpcClient("http://localhost:4080";);

Once we have our client we need to create a Vector that contains all the
parameters for the method. In this case we're calling the method
db.getDocumentCount that only takes one parameter. This is the path of the
collection that we want to count the documents in. Parameters in XML-RPC
must be added to the Vector in the order that they are listed in the method
signature. In this case we only have one, so there is no problem, however
you need to be aware of this to call the other methods in the API.
       Vector params = new Vector();
       params.addElement("/db/root");


This is the way I constructed my message based upon the above example:

<methodCall><params><param><value><array><data><value><string>/db/root</stri
ng></value>
</data>
</array></value>
</param>
</params>
<RPCmethodName>db.getDocumentCount</RPCmethodName>
</methodCall>

And this is the reply that I received:

<methodResponse><fault></fault>
<params><param></param>
</params>
</methodResponse>


Somehow, I don't think my message was properly constructed.  I'm not sure
how to interpret the response, but it is now what I was expecting.  I would
be grateful for any insight that someone might have.

Thanks,
Pietro

Reply via email to