how to disable multipart streaming apache cxf

243 Views Asked by At

I am using cxf JaxWsProxyFactoryBean client. I want to disable multipart streaming from the client end. What proprieties should I tweak in order to achieve it.

I tried to set chunked to false but not sure how to check if the streaming has been disabled.

Here is my code :

     Map<String, List<String>> head = getTransmissionHeaders();
     JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();

     ........... 

     org.apache.cxf.endpoint.Client yclient = (org.apache.cxf.endpoint.Client) factory.create();

     ..................

    Map<String, Object> ycontext = yclient.getRequestContext();
    ycontext.put(MessageContext.HTTP_REQUEST_HEADERS, head);

    ...............

    private Map<String, List<String>> getTransmissionHeaders() {
                  Map<String, List<String>> head = new HashMap<>();
                  head.put(HttpHeaderHelper.ACCEPT_ENCODING, Arrays.asList("gzip", "deflate"));
                 head.put(HttpHeaderHelper.CHUNKED, Arrays.asList("false"));
                 return head;
          }
0

There are 0 best solutions below