Has this topic been thoroughly explored in prior posts?  Richard brings up a great 
topic here and one that I personally need to resolve -- compression via Axis.  I was 
initially led to believe that Axis would include compression support but that doesn't 
seem to be the case (maybe I'm missing something??).  

It looks as if Richard is essentially attempting to add a choke point along the 
request route to see if he can write a compressed stream to the client by way of the 
CompressionResponseWrapper.  I would guess that he has added a filter to the 
AxisServlet -- seems like there's got to be a better way to do this?

Is this sort of thing better done in a response handler?  Or can you even do it at 
that point?  Can I wrap the HttpServletResponse object with the 
CompressionResponseWrapper somewhere along the way?  I'm a little confused re: the way 
to head here.

Thanks for any suggestions,
Cory


-----Original Message-----
From: Kellogg, Richard [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 06, 2003 3:02 PM
To: [EMAIL PROTECTED]
Subject: GZip Compression


I have been doing some research on the topic of how to enable Gzip compression between 
Axis and a Microsoft .NET Framework client.

It appears the best way to go about doing this is to add a http header along with the 
request from the client.  The following article describes how to add the header and 
then decompress the response stream.  It requires the use of an open source Zip 
library on the client.

Retrieving Data from Web Services using Standard HTTP 1.1 Compression by Jacek Chmiel 
(http://www.dotnetjunkies.com/tutorials.aspx?tutorialid=304)

I then attempted to use a standard Java Servlet 2.3 Filter to compress data sent from 
the server.  My compression filter came from the code in the following article:

Filter code with Servlet 2.3 by Jason Hunter 
(http://www.servlets.com/soapbox/filters.html)

This appears to be the most straightforward way to add compression capabilities to 
Axis.  By adding a request header, I state that my client application can accept 
compressed or uncompressed data.  Therefore, I do not loose interoperability with 
other implementations.  The compression filter checks for the header and then 
compresses data generated by Axis.

I think this design is simple and elegant.  Unfortunately, it does not work.  Does 
anyone have any ideas?  Does anyone know of a Gzip compression library for .NET that 
has been tested for compatibility with the Java implementation?

Any thoughts appreciated.
Rick






Reply via email to