Hi Roland,

I posted it in this mailing list, as the problem occured since I switched
from the default sun classes
to the commons HttpClient.
With the default sun classes I wrote everything to an ObjectOutputStream,
but I couldn't find a similar
approach for HttpClient.

If I understand it correctly what you are saying, then I should look at
entities, which
allow me to do the same as I did before with the default sun classes.

I'll take a look at the urls below.

Thanks and my apologies if this post is/was off-topic.

Santo

On 6/29/06, Roland Weber <[EMAIL PROTECTED]> wrote:

Hello sANTo,

your getting an exception on the server side from an
ObjectInputStream layered on top of a ByteArrayInputStream.
However I look at it, this has nothing to do with HttpClient
and is off-topic for this mailing list. Maybe your Hashtable
holds objects of a class that is unknown on the server side?

You are badly abusing the HTTP protocol by sending data in a
header instead of an entity (message body). If you have to
send data, in particular binary data, then use a POST or PUT
method. You can send binary data without string-encoding it.
The string en- and decoding is another potential source of
your problem. Have you debug-printed and compared the string
and the byte array on client and server side?


http://jakarta.apache.org/commons/httpclient/apidocs/org/apache/commons/httpclient/methods/EntityEnclosingMethod.html

http://jakarta.apache.org/commons/httpclient/apidocs/org/apache/commons/httpclient/methods/ByteArrayRequestEntity.html

Using an entity, you can stream the data directly through an
ObjectOutputStream instead of wasting memory for temporary
byte arrays and strings. That's not much of a difference for
the data sizes you mentioned in your mail, but I don't know
how big your tables will become.


http://jakarta.apache.org/commons/httpclient/apidocs/org/apache/commons/httpclient/methods/RequestEntity.html


hope that helps,
  Roland

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


Reply via email to