2 Replies Latest reply on Dec 18, 2014 6:40 AM by nickarls

    Forcing CXF gzip compression

    nickarls

      Hi,

       

      I have a problem with a large WS-request that I can't get to gzip compress. My endpoint has

       

      @Stateless

      @WebService

      @GZIP(force = true)

      // also tried these below

      // @InInterceptors(interceptors = "org.apache.cxf.transport.common.gzip.GZIPInInterceptor")

      // @OutInterceptors(interceptors = "org.apache.cxf.transport.common.gzip.GZIPOutInterceptor")

      @EndpointProperty(key = "org.apache.cxf.stax.maxChildElements", value = { "200000" })

       

      and my dynamic client init looks something like

       

            Service service = Service.create(...);

            client = service.getPort(MyClient.class);

            Client clientProxy = ClientProxy.getClient(client);

            clientProxy.getInInterceptors().add(new GZIPInInterceptor());

            clientProxy.getOutInterceptors().add(new GZIPOutInterceptor(0));

            HTTPConduit conduit = (HTTPConduit) clientProxy.getConduit();

            HTTPClientPolicy policy = new HTTPClientPolicy();

            policy.setConnectionTimeout(...);

            policy.setReceiveTimeout(...);

            conduit.setClient(policy);

       

      but my request still hits my undertow 100M(!) limit. Which shouldn't be possible if gzip was really in use.

       

      Help would be appriciated! Is palin still the local wizard? ;-)