users@jax-ws.java.net

Re: How to activate gzip compression on jax-ws client side

From: Vivek Pandey <Vivek.Pandey_at_Sun.COM>
Date: Thu, 07 Jun 2007 10:00:40 -0700

You can enable GZIP compression by adding some HTTP headers. Here is
what you need to do:
            
 
            Map> httpHeaders = new HashMap>();
             httpHeaders.put("Content-Encoding",
Collections.singletonList("gzip"));
             httpHeaders.put("Accept-Encoding",
Collections.singletonList("gzip"));
             Map reqContext = bindingProvider.getRequestContext();
             reqContext.put(MessageContext.HTTP_REQUEST_HEADERS,
httpHeaders);

-vivek.

Henri Gomez wrote:
> Hi to all,
>
> I wonder how to activate the gzip compression (or set accept-encoding:
> gzip in http request header) in JAX-WS 2.0 and later.
>
> Regards
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jax-ws.dev.java.net
> For additional commands, e-mail: users-help_at_jax-ws.dev.java.net
>