How to log the SOAP message of a spring jax-ws client
Asked Answered
B

1

0

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}"/>
Bussell answered 12/3, 2014 at 14:28 Comment(0)
B
1

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" />
Bussell answered 12/3, 2014 at 14:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.