Alex, thanks for the reply.
I guess SearchMethod does get something since the length of response content
changes a lot for different queries. However I can neither get response body
nor query body. Is there some other way to get search result?
This is how I tried to see the response body and query body:
if (searchMethod.succeeded()){
String q = searchMethod.getQueryString();
String resp = searchMethod.getResponseBodyAsString();
long length = searchMethod.getResponseContentLength();
System.out.println("query String: " + q + " response: " + resp +
" length: " + safeLongToInt(length));
}
These are queries that I tried:
query = "//element(*, nt:file)";
search method is allowed
query String: null response: null length: 81047
statusCode 207
text Multi-Status
---
query = "//element(*, nt:base)";
search method is allowed
query String: null response: null length: 507120
statusCode 207
text Multi-Status
---
query = "//element(*, nt:unstructured)";
search method is allowed
query String: null response: null length: 854
statusCode 207
text Multi-Status
BR
Shen
-----Original Message-----
From: Alexander Klimetschek [mailto:[email protected]]
Sent: den 23 juni 2010 16:00
To: [email protected]
Subject: Re: Jackrabbit SearchMethod - status code 207 but null response
On Wed, Jun 23, 2010 at 15:26, Xiaojie Shen
<[email protected]> wrote:
> String query = "//sv:no...@sv:name='jcr:root']";
This looks like the system view export XML. However, Xpath queries in
JCR work based on the plain document view mapping. Examples would be
//element(*, nt:file)
to find all file nodes
/jcr:root
to select the root node
For more information, see here
http://wiki.gxdeveloperweb.com/confluence/display/GXDEV/XPath+JCR+Sample+Queries
or the JCR 1.0 spec, section 6.6
http://www.day.com/specs/jcr/1.0/
or search the mailing list archives
http://jackrabbit.markmail.org/
Regards,
Alex
--
Alexander Klimetschek
[email protected]