I've configured CXF
and now I want to use logging and configure it from xml without extra code. For this purpose, I've added this xml configuration to my appContext
:
<import resource="classpath:META-INF/cxf/cxf.xml" />
<bean class="org.apache.cxf.interceptor.LoggingInInterceptor" id="logInInterceptor" />
<bean class="org.apache.cxf.interceptor.LoggingOutInterceptor" id="logOutInterceptor" />
<cxf:bus>
<cxf:inInterceptors>
<ref bean="logInInterceptor" />
</cxf:inInterceptors>
<cxf:outInterceptors>
<ref bean="logOutInterceptor" />
</cxf:outInterceptors>
</cxf:bus>
<jaxws:endpoint id="myServiceBean" implementor="com.mysite.webservice.myWSDLBean_Client" address="/mySearch">
</jaxws:endpoint>
but it doesn't log anything during call, though when there is server deployment, I see that logInInterceptor
and logOutInterceptor
are mapped. What am I doing wrong?
And is there any way to configure writing logs to an external file (not to console) ?