我想用log4j记录jax-ws客户端spring bean生成的SOAP消息。
这是jax-ws客户端bean:
<jaxws:client id="soapClient" serviceClass="${serviceClass}" address="${service.url}"/>
答案 0 :(得分:1)
只需按如下方式定义bean:
<jaxws:client id="soapClient"
serviceClass="${serviceClass}"
address="${serviceUrl}">
<jaxws:outInterceptors>
<ref bean="loggingOutInterceptor"/>
</jaxws:outInterceptors>
</jaxws:client>
<bean id="loggingOutInterceptor" class="org.apache.cxf.interceptor.LoggingOutInterceptor" />