You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Anil Bondalapati <an...@oracle.com> on 2011/05/21 01:44:37 UTC

Unable to send compressed message !

Hi, 

I have two webservices deployed on two different servers. (service1 and service2) 
>From my client program I have enabled the GZIP format on the request for the serviceClient. 

When I make a call to the service1, the message is compresses and sent to the server and everything looks good. 

After some time I made a call to the service2 and the request xml is sent in compressed format and looks fine. 

But Now if I sent the message to the service1, it is in clear text and not using the compressed format. 

Am I missing any options on the ServiceClient. Please let me know if you have faced this problem. 

Here is the code I am using: 
                   HttpMethodRetryHandler retry_handler = new DefaultHttpMethodRetryHandler(0, false); 
                    HttpClientParams params = new HttpClientParams(); 
                    params.setParameter(HttpMethodParams.RETRY_HANDLER, retry_handler); 
                    options.setProperty(HTTPConstants.CACHED_HTTP_CLIENT, new org.apache.commons.httpclient.HttpClient(params, manager)); 
                options.setProperty(HTTPConstants.MC_GZIP_REQUEST, true); 
                options.setProperty(HTTPConstants.MC_ACCEPT_GZIP, true); 
                options.setProperty(HTTPConstants.MC_GZIP_RESPONSE, true); 
                  options.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, true); 
              
                options.setTimeOutInMilliSeconds(wsTimeOutInMilliSeconds); 
                options.setProperty(HTTPConstants.CONNECTION_TIMEOUT, wsTimeOutInMilliSeconds); 
                options.setCallTransportCleanup(true); 

 

Any help is greatly appreciated.

Thanks

Anil.