Stefan,

The closing </prop> tag in the where clause is in the wrong place. Try this ...

<d:searchrequest xmlns:d="DAV:">
<d:basicsearch>
<d:select>
<d:prop><d:displayname /></d:prop>
</d:select>
<d:from>
<d:scope>
<d:href>/slide/files/swissiPvPortal/pdf</d:href>
<d:depth>infinity</d:depth>
</d:scope>
</d:from>
<d:where>
  <d:gt>
     <d:prop><d:getcontentlength/></d:prop>
     <d:literal>5</d:literal>
   </d:gt>
</d:where>
</d:basicsearch>
</d:searchrequest> 

- Rob.


-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Stefan Burkard
Sent: Thursday, September 09, 2004 10:00 AM
To: [EMAIL PROTECTED]
Subject: Re: searchmethod, responsestate 422

hi ingo

thanks, but still the same with the following new request-xml. in the scope-dir 
(absolute path insinde tomcat) are several pdf-files that have surely bigger 
contentlength than 5...

<d:searchrequest xmlns:d="DAV:">
<d:basicsearch>
<d:select>
<d:prop><d:displayname /></d:prop>
</d:select>
<d:from>
<d:scope>
<d:href>/slide/files/swissiPvPortal/pdf</d:href>
<d:depth>infinity</d:depth>
</d:scope>
</d:from>
<d:where>
<d:gt><d:prop>
<d:getcontentlength /><d:literal>5</d:literal> </d:prop></d:gt> </d:where> 
</d:basicsearch> </d:searchrequest>

Ingo Brunberg wrote:

> And your scope is missing a depth.
> 
> 
>>Try with searchrequest instead of searchRequest and basicsearch 
>>instead of basicSearch.
>>
>>Ingo
>>
>>
>>>hi sliders
>>>
>>>i'm trying to do a search in slide with the dasl-search, but 
>>>recieving state 422 all the time...
>>>
>>>the request-xml (built with jdom):
>>><d:searchRequest xmlns:d="DAV:">
>>><d:basicSearch>
>>><d:select>
>>>     <d:prop><d:displayname /></d:prop> </d:select> <d:from>
>>>     <d:scope><d:href>/slide/files</d:href></d:scope>
>>></d:from>
>>><d:where>
>>>     <d:gt><d:prop>
>>>         <d:getcontentlength /><d:literal>5</d:literal>
>>>     </d:prop></d:gt>
>>></d:where>
>>></d:basicSearch>
>>></d:searchRequest>
>>>
>>>the code (parameter path is "/slide/files"):
>>>SearchMethod smethod = new SearchMethod(path, query); HttpURL url = 
>>>new HttpURL("http://192.168.200.36:8080/slide";);
>>>HttpClient client = new HttpClient(); client.setState(new 
>>>WebdavState()); HostConfiguration config = 
>>>client.getHostConfiguration(); config.setHost(url);
>>>
>>>Credentials creds = new UsernamePasswordCredentials("root", "root"); 
>>>if(creds != null) {
>>>      HttpState state = client.getState();
>>>      state.setCredentials(null, url.getHost(), creds);
>>>      state.setAuthenticationPreemptive(true);
>>>}
>>>
>>>int state = client.executeMethod(smethod);
>>>
>>>Header[] headers = smethod.getResponseHeaders(); for(int 
>>>i=0;i<headers.length;i++) {
>>>      logger.info(headers[i].toString());
>>>}
>>>
>>>Enumeration enum = smethod.getAllResponseURLs();
>>>while(enum.hasMoreElements()) {
>>>      logger.info(enum.nextElement()); }
>>>
>>>any suggestions?
>>>stefan


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to