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
smime.p7s
Description: S/MIME Cryptographic Signature
