If you do ctx.setGzip(true) on the client, it will do gzip on the payload the client is sending. The server will automatically uncompress it. With the gzip=true in the deployment descriptor, the server will gzip the payload it sends to the client, assuming the client has sent Accept-Encoding: gzip in the request, which the latest Apache SOAP client does. The client will automatically uncompress without doing anything via SOAPContext.
Scott Nichol ----- Original Message ----- From: "Malte Kempff" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, December 05, 2002 8:01 AM Subject: AW: Compression support in Apache SOAP > Hi Scott, > I have the trouble to send huge data through a soap-service. Right now I do > it via a Vector, but it is much to slow for a ISDN-Line, for instance. > Do I understand right, that using > SOAPContext ctx = new SOAPContext(); > ctx.setGzip(true); > and put > <isd:option key="gzip" value="true"/> > to the deploy descripor > will automaticly compresses the soap message on the server site and > decrompresses it on the client? > or does this work only by compressing and decompressing data programmaticly? > > -----Ursprüngliche Nachricht----- > Von: Scott Nichol [mailto:[EMAIL PROTECTED]] > Gesendet: Donnerstag, 5. September 2002 19:00 > An: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Betreff: Re: Compression support in Apache SOAP > > > I've just committed a change to add gzip encoding for HTTP. You can get > this capability immediately by grabbing the CVS source, or tomorrow by > getting the nightly built for tonight. > > The encoding is enabled on the client through SOAPContext. For example, the > client in the gzip sample does the following: > > // Build the call. > SOAPContext ctx = new SOAPContext(); > ctx.setGzip(true); > Vector params = new Vector(); > params.addElement(new Parameter("data", inFileData.getClass(), > inFileData, null)); > Call call = new Call("urn:gzip-sample", > "test", > params, > null, > Constants.NS_URI_SOAP_ENC, > ctx); > > The ctx.setGzip(true) indicates that the request will be sent with gzip > encoding. > > On the server, encoding is enabled through the deployment descriptor. The > service in the gzip sample has > > <isd:option key="gzip" value="true"/> > > The server will only use gzip encoding if the client indicates it can handle > it by sending an Accept-Encoding header. Starting with this change, the > Apache SOAP client always sends such a header. > > The gzip sample is the only testing I've done of this feature. Note that it > should work with any SOAP message, including one in which there are > attachments. > > Scott Nichol > > ----- Original Message ----- > From: "Scott Nichol" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, September 04, 2002 1:25 PM > Subject: Re: Compression support in Apache SOAP > > > The current Apache SOAP code does not have "built-in" support for compressed > messages (such as by using gzip with HTTP 1.1). However, you can zip files > that you send as attachments. Read the full thread at > http://marc.theaimsgroup.com/?l=soap-dev&m=102690794625939&w=2 for more > information. > > Scott Nichol > > ----- Original Message ----- > From: "Rodrigo Ruiz" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, September 04, 2002 9:21 AM > Subject: Compression support in Apache SOAP > > > Hi all, > > Does Apache SOAP comes with built-in support for compressed messages? > > I am developing a SOAP client wich must receive/transfer data files from the > server. These files can be of arbitrary size. > > I'm interested in having my 'Apache SOAP over Tomcat' to automatically > compress the whole SOAP message. This way, I would not have to deal with zip > libraries. > > Thanks in advance, > Rodrigo > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>