Hi Matt
I have downloaded
xindice-xmlrpc-0.6.zip from xindice-xmlrpc.sourceforge.net and configured
with XINDICE 1.0. I have started with sample client implementation code found
under "<xindice-xmlrpc-0.6-HOME>\Xindice-XMLRPC\tests\src". You should
look at the methods "testQueryDocument" and "testQueryCollection". In place of
"XPath" you should refer to "XUpdate".
Say for Example
String xUpdateQuery = "Your XUpdate
Query"
Vector params =
new Vector();
String strCollection =
"CollectionName with path"
params.addElement(strCollection);
params.addElement("XUpdate");
params.addElement(xUpdateQuery);
params.addElement(new
Hashtable());
client.execute("db.queryCollection", params);
Hope this will help you
~Senthil
----- Original Message -----
From: "jcplerm" <[EMAIL PROTECTED]>
Sent: Friday, August 08, 2003 3:21
AM
Subject: Re: xindice 1.1 xupdate
java xml-rpc
> XINDICE_HOME\java\src\org\apache\xindice\client\xmldb\xmlrpc\CollectionImpl.
> java.
> That file, as stated by other members of this mailing list, is a good
> example of client XML-RPC code.
> What I did was to "canibalize" that code and build my own Collection class,
> with the XUpdate method that I sent yesterday.
> Copy the CollectionImpl.java, rename it, add the XUpdate method and use it
> in your application by
> calling its constructor with the proper parameters.
> But now I forgot where I found the TYPE param.....
>
> jlerm
>
> ----- Original Message -----
> From: "matt ma" <[EMAIL PROTECTED]>
> To: <xindice-users@xml.apache.org>
> Sent: Thursday, August 07, 2003 4:32 PM
> Subject: Re: xindice 1.1 xupdate java xml-rpc
>
>
> > Hi jlerm, thanks for the quick reply. I gave your
> > code a whirl in my xml-rpc code and got a
> > stackoverflow error. My current xml-rpc code works
> > and can successfully create collection. Do you think
> > you could send me your
> >
> > runRemoteCommand("Query", params)
> >
> > method? That way I can compare the difference between
> > my xml-rpc code and yours.
> >
> > Also, how did you figure out the TYPE param? Is there
> > some documentation that I haven't found yet? or did
> > you look into the source code?
> >
> > thanks a bunch,
> >
> > matt
> >
> >
> >
> > --- jcplerm <[EMAIL PROTECTED]> wrote:
> > > 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
> > >
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! SiteBuilder - Free, easy-to-use web site design software
> > http://sitebuilder.yahoo.com
>
>