Further information: I came across the following thread but it doesn't have the solution to the problem: http://cxf.547215.n5.nabble.com/CXF-Client-performance-troubleshooting-td5738660.html We have the exact same problem where 80% of time it performs great and 20% of time it doesn't. I found following 2 log entries in our logs with 200ms difference between and have seen this time going up into seconds sometime:
2016-02-26 14:06:11,672 [makeTrustDecision] - No Trust Decider for Conduit '{http://www.xxx.com/wsdl}myPort.http-conduit'. An afirmative Trust Decision is assumed. 2016-02-26 14:06:11,898 [onFirstWrite] - Sending POST Message with Headers to https://my.service.com/test/services Conduit :{http://www.xxx.com/wsdl}myPort.http-conduit And I suspect the NPE which we saw mentioned in following email appears before above 2 log statements, So NPE case also seems related to performance issue : 2016-02-26 14:06:11,671 [doIntercept] - Invoking handleMessage on interceptor org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor@c0a3ed1 So in short it seems I am asking 2 questions here: 1. Why so much of time consumption in No Trust Decider for Conduit & Sending POST Message log statements? && 2. Why NPE in SoapOutInterceptor which happens just before above statements? If any more information required please let me know and any direction would be of great help. Thanks, Vishal From: Balana, Vishal Sent: Friday, February 26, 2016 11:31 AM To: 'dev@cxf.apache.org' Subject: NullPointerException due to missing JAXBContext in DataWriterImpl(CXF Version: 2.7.3) Hello All, CXF Version: 2.7.3 We are trying to call the soap web service using JaxWsClientProxy and occasionally getting NullPointerException from Interceptor chain as following: I am trying to understand the possible scenario where JAXBContext could go null and continuing my research but it would be of great help If any of you could provide any lead on it please. Also I am seeing the Inteceptor chain throwing NPE is taking more than 1000ms before writing to server. java.lang.NullPointerException at org.apache.cxf.jaxb.io.DataWriterImpl.createMarshaller(DataWriterImpl.java:101) at org.apache.cxf.jaxb.io.DataWriterImpl.write(DataWriterImpl.java:169) at org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.writeSoapEnvelopeStart(SoapOutInterceptor.java:156) at org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessage(SoapOutInterceptor.java:81) at org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor.handleMessage(SoapOutInterceptor.java:61) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271) at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:133) Thanks, Vishal