On Wednesday 12 January 2011 9:20:05 am Christian Müller wrote:
> Hello List!
> 
> We have the requirement to log only faulty requests (requests which throws
> a validation exception by validating against the xml schema). Is it
> possible to do this?
> If I configure the in interceptor, all requests are logged (as expected).
> <inInterceptors>
>   <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
> </inInterceptors>
> 
> If I configure the inFaultInterceptor, nothing is logged (as expected
> becuase the requestis not a fault message).
> 
> Any ideas? 'm using CXF 2.2.9.

I would suggest grabbing the source for the LoggingInInterceptor and using 
that as a starting point.   When the message comes in, it would "save" the 
message someplace.    Then, if handleFault is called, it would check the cause 
of the fault and do the logging if needed.

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

Reply via email to