You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by Josh Orchard <jo...@emediatedesigns.com> on 2004/11/09 03:18:44 UTC

getResponseBodyAsStream is null

Hello all.

I'm developing a webdav client using the Apache Slide project.  I was
using another HTTPClient to do the work but had to move on and now use
the apache HTTPClient and Slide to do my communication to my server.

I have noticed that if I construct a PropFindMethod or any other type
of slide client method and execute the call, if the return code is a
failure that I can not get the body from the getResponseBodyAsStream
call is it is always null.

On my server I have been sending a body back with detail error codes
for my client to display to the user as to what could be the problem. 
Now I can only use the generic messages which limits my ability to
explain to the user what could be the issue.

Below is what I'm executing.  Is there another way to get the body
back or should I be constructing or using another Class for my client?
 I'm using the Slide client 2.0 & HTTPClient 2.0.2

Thanks,

Josh

Code:

httpmethod =  new PropFindMethod (URI);
httpmethod.setRequestBody(body);
returncode = HttpClient.executeMethod(hostConf,httpmethod,httpState);
status   = httpmethod.getStatusCode ();
httpmethod.getResponseBodyAsStream();




---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org