1

I have logging features works fine in cxf client 3.3.4 version but when there is a timeout error (java.net.SocketTimeoutException) from soap call, the inbound message doesn't get logged. Can you please let know how/what to configure to get the inbound message to log?

JaxWsProxyFactoryBean proxy = new JaxWSProxyFactoryBean()
---
--
LoggingInInterceptor reqInter = new LoggingInInterceptor();
LoggingOutInterceptor resInter = new LoggingOutInterceptor();
proxy.getInInterceptors().add(reqInter);
proxy.getOutInterceptors().add(respInter);
proxy.getOutInterceptors().add(new NillableSAAJInterceptor());
proxy.getOutInterceptors().add(new SAAJOutInterceptor());

log4j.xml

   <AsyncLogger name ="org.apache.cxf" level="info">
   </AsyncLogger>
   <AsyncLogger name="org.apache.cxf.interceptor.LogginInIntercetpor" level="info">
   </AsyncLogger>
   <AsyncLogger name="org.apache.cxf.interceptor.LoggingOuInteceptor" level="info">
   </AsyncLogger>
skumar
  • 985
  • 4
  • 14
  • 37

1 Answers1

1

The JAX-WS client is sending the SOAP message to the server using HTTPS and then the message is going to the Message Logging Interceptor in your application. You must tell CXF that it needs to configure an additional Nginx/Apache HTTP Proxy server which is used to serve messages from the HTTP endpoint to the SOAP endpoint.
Try the below configuration in your application instead. If that works, then we can talk about other approaches.

<jaxws:client configurator-ref="cxfClientConfig">
   <jaxws:inInterceptors>
      <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
   </jaxws:inInterceptors>
   <jaxws:outInterceptors>
      <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
     </jaxws:outInterceptors>
   <jaxws:inFaultInterceptors>
      <bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
   </jaxws:inFaultInterceptors>
   <jaxws:outFaultInterceptors>
      <bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
   </jaxws:outFaultInterceptors>
</jaxws:client>
gra1w
  • 21
  • 1