I'm trying to use the xpath query mechanism through webdav.

========
String jackrabbitquery=
"<d:searchrequest xmlns:d=\"DAV\"
dcr:=\"http://www.day.com/jcr/webdav/1.0\";>" +
"<dcr:xpath>//sv:[EMAIL PROTECTED]:name='jcr:root']</dcr:xpath>" +
"</d:searchrequest>";
....
String mypath = "/jackrabbit-server-1.1/server/default/";
HttpURL url = new HttpURL("http://localhost:8080"; + mypath);
...
SearchMethod smethod = new SearchMethod(mypath,jackrabbitquery,"xpath");
...
=======

And I'm always getting 400 responses and various errors like:

==========
<D:error xmlns:D="DAV:"><dcr:exception
xmlns:dcr="http://www.day.com/jcr/webdav/1.0";><dcr:class>javax.jcr.query
.InvalidQueryException</dcr:class><dcr:message>Encountered "&lt;EOF&gt;"
at line 1, column 163.&#xd;
Was expecting one of:&#xd;
....

And
<D:error xmlns:D="DAV:"><dcr:exception
xmlns:dcr="http://www.day.com/jcr/webdav/1.0";><dcr:class>javax.jcr.query
.InvalidQueryException</dcr:class><dcr:message>Lexical error at line 1,
column 45.  Encountered: ":" (58), after : "": Lexical error at line 1,
column 45.  Encountered: ":" (58), after :
""</dcr:message></dcr:exception></D:error>
========

Could someone point me to some example or test code or some similar
sample that would be a reference working example?  Using the
org.apache.jackrabbit.webdav.client.methods.SearchMethod from jackrabbit
1.1.

Thanks,
-D

Reply via email to