This is an XML-RPC piece of code that executes XUpdate. It's almost the same
as for a regular query, except the "TYPE" param is "XUpdate".

    public String executeXUpdate(String xupdateCmd) throws XMLDBException {

     String result=null;

        try {
            checkOpen();

            Hashtable params = new Hashtable();
            Hashtable ns = new Hashtable();
            params.put(RPCDefaultMessage.COLLECTION, collPath);
            params.put(RPCDefaultMessage.TYPE, "XUpdate");
            params.put(RPCDefaultMessage.NAMESPACES, ns);
            params.put(RPCDefaultMessage.QUERY, xupdateCmd);

             result = (String) runRemoteCommand("Query", params);
         } catch (Exception e) {
            throw
FaultCodes.createXMLDBException(FaultCodes.QRY_PROCESSING_ERROR, "Query
error", e);
        }

         return result;
    }

jlerm

----- Original Message ----- 
From: "matt ma" <[EMAIL PROTECTED]>
To: <xindice-users@xml.apache.org>
Sent: Wednesday, August 06, 2003 11:13 PM
Subject: xindice 1.1 xupdate java xml-rpc


> Hello,
>
> Does anyone have any code samples or point me to where
> I can find some code samples on executing xupdate
> statements with xml-rpc in java?  I'm a heavy user of
> xupdate on xindice 1.0 and would like to migrate my
> code to use xindice 1.1 and xml-rpc.
>
> So far, all I've found is
> How to send XML-RPC messages to Xindice 1.1
> http://www.coachingplatform.com/dev/xindiceRPC1.1cmds.html
>
> which is useful but does not mention anything about
> XUpdate statements.
>
> I also looked in the
> org\apache\xindice\server\rpc\messages package and did
> not find any messages associated with Xupdate.
>
> Any help would be appreciated.  Thanks in advance.
>
> -matthew
>
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com

Reply via email to