You need to conditionally wrap the input stream:
| URL url = new URL("http://localhost:8080/invoker/JNDIFactory");
| URLConnection conn = url.openConnection();
| conn.setRequestProperty("Accept-Encoding", "x-gzip, x-deflate, gzip,
deflate, identity");
| InputStream is = conn.getInputStream();
| Map<String, List<String>> headers = conn.getHeaderFields();
| System.out.println(headers);
| System.out.println(is);
| List<String> encoding = headers.get("Content-Encoding");
| boolean gzip = encoding.contains("gzip");
| if( gzip )
| is = new GZIPInputStream(is);
| ObjectInputStream ois = new ObjectInputStream(is);
| Object proxy = ois.readObject();
| System.out.println(proxy);
| is.close();
| ois.close();
|
| ...
|
| {X-Powered-By=[Servlet 2.4; JBoss-4.0.4.CR2 (build: CVSTag=JBoss_4_0_4_CR2
date=200602271624)/Tomcat-5.5], Content-Encoding=[gzip], Date=[Wed, 01 Mar 2006
16:36:59 GMT], null=[HTTP/1.1 200 OK], Server=[Apache-Coyote/1.1],
Content-Type=[application/x-java-serialized-object;
class=org.jboss.invocation.MarshalledValue], Transfer-Encoding=[chunked],
Vary=[Accept-Encoding]}
| [EMAIL PROTECTED]
| [EMAIL PROTECTED]
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3927157#3927157
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3927157
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user