cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jan.minarovi...@external.t-mobile.at
Subject Re: http-conf:conduit problem [Virus checked]
Date Mon, 11 Aug 2008 09:47:52 GMT
Thanks Ian, going to try. My workaround was to call after startup, before 
creating first client:

 org.springframework.context.annotation.CommonAnnotationBeanPostProcessor 
c = 
((org.springframework.context.annotation.CommonAnnotationBeanPostProcessor)
applicationContext.getBean(
"org.springframework.context.annotation.CommonAnnotationBeanPostProcessor"
));
        c.ignoreResourceType("org.apache.cxf.transport.http.HTTPConduit");
        c.ignoreResourceType(
"org.apache.cxf.configuration.security.AuthorizationPolicy");
        c.ignoreResourceType(
"org.apache.cxf.transports.http.configuration.HTTPClientPolicy");
        c.ignoreResourceType(
"org.apache.cxf.configuration.security.ProxyAuthorizationPolicy");
        c.ignoreResourceType(
"org.apache.cxf.configuration.jsse.TLSClientParameters");
        c.ignoreResourceType(
"org.apache.cxf.transport.http.MessageTrustDecider");
        c.ignoreResourceType(
"org.apache.cxf.transport.http.HttpBasicAuthSupplier");
 
best regards
jano




Ian Roberts <i.roberts@dcs.shef.ac.uk> 
08/08/2008 14:24
Bitte antworten an
users@cxf.apache.org


An
users@cxf.apache.org
Kopie

Thema
Re: http-conf:conduit problem -  [Virus checked]






jan.minaroviech@external.t-mobile.at wrote:

> how can i modify this code to disable http chunking if required?

After the "T port = (T) factory.create();", you can do

       Client client = ClientProxy.getClient(port);
       Conduit conduit = client.getConduit();
       if(conduit instanceof HTTPConduit) {
         HTTPClientPolicy policy = ((HTTPConduit)conduit).getClient();
         if(policy == null) {
           policy = new HTTPClientPolicy();
           ((HTTPConduit)conduit).setClient(policy);
         }

         // disable chunking
         policy.setAllowChunking(false);
       }

Ian

-- 
Ian Roberts               | Department of Computer Science
i.roberts@dcs.shef.ac.uk  | University of Sheffield, UK




Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message