Hello Niti,

>    Thanks for your reply. Yes, I also tried sending the plain file
> without the AudioStream. Still it was not received at the server. I am
> using the setRequestEntity method since setRequestBody is deprecated. Do
> you think that might be a problem?

No, that is the way you're supposed to do it. Could it be that there
is a problem with the file you are sending? For example that another
process has a lock on the file and it can't be opened because of that?
Try making a copy manually and send the copy.

> After making several attempts, I finally switched to something without
> using HttpClient, i.e. I used URL, URLConnection and OutputStream to
> write the audio data to the stream. I see that it gets received at the
> server meaning it shows the content length correctly. But when I try to
> perform a read on the stream, it always returns -1. 

The content length is sent in the header, and it seems the file data
isn't sent with HttpURLConnection either. I suspect the problem is on
the client side when reading the file. Have you tried reading it into
memory without sending it?

Consider enabling the wire log for the headers and send us the output:
http://jakarta.apache.org/commons/httpclient/logging.html

hope that helps,
  Roland


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

Reply via email to