Hello Roland, Yes, i was quite embarrased about the fact that my friend paste me this url AFTER i've sent my email to this mailing list .. The solution is here : http://mail-archives.apache.org/mod_mbox/commons-user/200408.mbox/[EMAIL PROTECTED]
And it works like magic, i've just tested. So thank you everyone ! :) On 8/3/07, Roland Weber <[EMAIL PROTECTED]> wrote: > > Hello Albert, > > > how to get > > the java object from the servlet using HttpUtil. I hope it's just as > simple > > as : > > > > InputStream in = method.getResponseBodyAsStream(); > > BufferedInputStream bin = new BufferedInputStream(in); > > ObjectInputStream objIn = new ObjectInputStream(bin); > > GZIPInputStream gzipIn = new GZIPInputStream(objIn); > > Object object = objIn.readObject(); > > Leave out the gzip part, or decompress between buffered and > object input stream. But basically, yes, that's how it works. > > > I dont know how to send a java object to a remote > > servlet. I know it has something to do with the > > PostMethod.setRequestEntity.. And i've seen the implementations of > > RequestEntity like > > InputStreamRequestEntity, FileRequestEntity, StringRequestEntity, but > > there's no ObjectRequestEntity or something. > > RequestEntity is an interface. Implement the ObjectRequestEntity > yourself, it's not that hard. I think this has also been discussed > on one of the mailing lists before. > > hope that helps, > Roland > > > -- All meetings end in partings That which rises must fall That which is collected will be dispersed Birth ends with death
