This definitely would be an interceptor ordering issue.   Both the logging and 
gzip interceptors run  in the same phase so the output would depend on the 
order.     My suggestion would be to use the Logging feature and then play 
with the order of the features:


org.apache.cxf.feature.LoggingFeature
<bean id="compressGZIPFeature"
    class="org.apache.cxf.transport.http.gzip.GZIPFeature"/>
<bean id="loggingFeature"
    class="org.apache.cxf.feature.LoggingFeature"/>
<cxf:bus>
     <cxf:features>
             <ref bean="compressGZIPFeature"/>
             <ref bean="loggingFeature"/>
     </cxf:features>
</cxf:features>

That may put the logging stuff second so the gzip would occur first.   

Dan




On Monday 21 March 2011 1:38:03 AM Emil Dombagolla wrote:
> Dear Everyone,
> 
> 
> I have CFX client program. My CFX.xml files as follows for your reference,
> 
> 
> I added logging interceptors and it works fine. Entire message printed on
> my console. And then I added the GZIP interceptor, now the problem is
> message-content of the log printed in compressed format.
> 
> 
> I want my program use the GZIP and log should be printed as normal readable
> text.
> 
> 
> Is it possible get it worked as this, can I change the interceptor order
> and fix this?
> 
> Please help me with any kind of suggestion,
> 
> Thank you so much.
> 
> Emil
> 
> 
> 
> 
> ---------------------------------------------------------------------------
> ---------------------------------------------------------------------------
> ------------------------
> 
> 
> <bean id="logInbound"
> class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
> 
>     <bean id="logOutbound"
> class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
> 
>     <bean id="compressGZIPFeature"
> class="org.apache.cxf.transport.http.gzip.GZIPFeature"/>
> 
>  <cxf:bus>
> 
>     <cxf:features>
> 
>             <ref bean="compressGZIPFeature"/>
> 
>         </cxf:features>
> 
>         <cxf:inInterceptors>
> 
>             <ref bean="logInbound"/>
> 
>         </cxf:inInterceptors>
> 
>         <cxf:outInterceptors>
> 
>             <ref bean="logOutbound"/>
> 
>         </cxf:outInterceptors>
> 
>         <cxf:outFaultInterceptors>
> 
>             <ref bean="logOutbound"/>
> 
>         </cxf:outFaultInterceptors>
> 
>         <cxf:inFaultInterceptors>
> 
>             <ref bean="logInbound"/>
> 
>         </cxf:inFaultInterceptors>
> 
>     </cxf:bus>

-- 
Daniel Kulp
[email protected]
http://dankulp.com/blog
Talend - http://www.talend.com

Reply via email to