It sounds like there may be a way to handle this compression on both sides as custom handlers just past the transport layer. Like on the server, it seems it could go right behind the servlet without needing to be in the servlet itself since I don't think the message is parsed at that point. The decompression can't be too far from the servlet though because the soap message itself (outside of the http headers) will be completely worthless until it is decompressed.
Hopefully someone can point me in the right direction on how to add this functionality "correctly" without having to add the functionality in places where it really doesn't belong architecture-wise.
Thanks for your input and interest.
James Carman wrote:
I would be very interested in the implementation also. Brian, you could
also achieve the GZIP decompression/compression on the server using a
reusable servlet filter quite easily, without extending AxisServlet. That's
what I've considered, but I would like a more reciprocal relationship
between the entities responsible for the decompression/compression on the
client and server. Namely, I would rather do it using handlers if possible,
or implement my own transport as you have said.
----- Original Message -----
From: "Brian W. Young" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 10, 2003 11:35 AM
Subject: re: gzip support
Thanks for the input. I'm determined to make this work because without
compression, I can't use Axis. I'm sending too much data for SOAP to be
feasible w/o compression. Of course, I'll make any solution I implement
available to the community.
I found some info on handlers but not a lot, especially on handlers at
the transport level. Here is what I am thinking. The HTTPSender class
is apparently a client transport handler. I need to extend this class
to wrap the output stream in a GZIP stream so that data going from the
client to the server is compressed. I do not yet know how to make an
Axis SOAP client use my new, extended HTTPSender class.
On the server, it looks like all requests coming in come to the
AxisServlet. I would assume I need to extend this servlet and wrap its
InputStream in a GZIP stream, and then modify web.xml to use the new
servlet instead. I've not found where on the server that I can put a
handler which will decompress the inbound data.
This approach may be incorrect. However, I have the skill set to
implement a good solution if someone more knowledgable of Axis can give
me some additional pointers. Let me know if this thread should move to
the deveoper list.
Thanks sincerely
Brian Young
>You should be able to write "Handlers" for Axis that will process the
>messages (both client and server) on the way in/out. This would allow
>you to support gzip'd data transparently.
>
>This is how Axis is designed, to be extensible. See the documentation
>for architecture details.
>
>Note that on the client, you configure the handlers in the
>'client-config.wsdd' file, pretty much the same way you do in the
>server-config.wsdd file.
>
>Hope this helps point you in the right diirection.
>
>--
>Tom Jordahl
>Macromedia Server Development