In fact what you could do is have this
RemoveLoggingInInterceptorInterceptor you write defined in
the specific Security Web Service jaxws:endpoint, so it does not even
have to check the current
endpoint info. If its defined for an endpoint it automatically
removes the interceptor.
An alternative to removing the interceptor would be to trick the
interceptor into not
executing any logging. If you check the start of the interceptor it
has the code:
if (message.containsKey(LoggingMessage.ID_KEY)) {
return;
}
You could in your custom interceptor add this key to the message so
that the above
if evaluates to true. Just make sure the interceptor is registered to
runBefore LoggingInInterceptor
On Thu, Oct 25, 2012 at 10:47 AM, Jason Pell <[email protected]> wrote:
> I am sure there is a better way - but what you could do is add an
> additional interceptor that executes as part of the SETUP phase. This
> would check what endpoint it is on and optionally remove the
> LoggingInInterceptor from the current execution chain.
>
> I am sure others will have better solutions
>
> On Thu, Oct 25, 2012 at 8:35 AM, Bruno Cappoen <[email protected]> wrote:
>> Hi everybody, i'm using a LoggingInInterceptor on the cxf bus to log
>> all the requests of my webservices.
>> It works perfectly.
>> In my webservices, i have a secure webservice for authentication. The
>> password is in the request (payload) and it is displayed
>> in the log.
>>
>> Is it possible to disable the LoggingInInterceptor for a specific
>> webservice ? Have you got a solution ?
>>
>> I don't want to specify for each webservice the interceptor because i
>> have many webservices and here, it's a specific need.
>>
>>
>> Thank you for your help.
>>
>>
>>
>> <beans xmlns="http://www.springframework.org/schema/beans"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xmlns:cxf="http://cxf.apache.org/core"
>> xsi:schemaLocation="http://cxf.apache.org/core
>> http://cxf.apache.org/schemas/core.xsdhttp://www.springframework.org/schema/beans
>> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
>>
>> <bean id="logInbound"
>> class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
>>
>>
>> <cxf:bus>
>> <cxf:outInterceptors>
>> <ref bean="logInbound"/>
>> </cxf:outInterceptors>
>> </cxf:bus> </beans>