Pergunta

I wanted to log with log4j the SOAP messages generated by a jax-ws client spring bean.

This is the jax-ws client bean:

<jaxws:client id="soapClient"  serviceClass="${serviceClass}" address="${service.url}"/>
Foi útil?

Solução

Just define the bean as follows:

<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" />
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top