And the issue looks to be related to this: Aug 19, 2011 3:46:02 PM org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging
WARNING: Interceptor for { http://ns.ca.com/catalyst/node}NodeX509#{http://www.w3.org/2010/08/ws-tra}Gethas thrown exception, unwinding now org.apache.cxf.binding.soap.SoapFault: Problem writing SAAJ model to stream at org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor$SAAJOutEndingInterceptor.handleMessage( *SAAJOutInterceptor.java:211*) at org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor$SAAJOutEndingInterceptor.handleMessage( *SAAJOutInterceptor.java:167*) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(* PhaseInterceptorChain.java:247*) at org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(* OutgoingChainInterceptor.java:77*) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(* PhaseInterceptorChain.java:247*) at org.apache.cxf.transport.ChainInitiationObserver.onMessage(* ChainInitiationObserver.java:113*) at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(* JettyHTTPDestination.java:311*) at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService( *JettyHTTPDestination.java:280*) at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(* JettyHTTPHandler.java:72*) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(* ContextHandler.java:922*) at org.eclipse.jetty.server.handler.ContextHandler.doScope(* ContextHandler.java:860*) at org.eclipse.jetty.server.handler.ScopedHandler.handle(* ScopedHandler.java:117*) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(* ContextHandlerCollection.java:247*) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(* HandlerWrapper.java:114*) at org.eclipse.jetty.server.Server.handle(*Server.java:348*) at org.eclipse.jetty.server.HttpConnection.handleRequest(* HttpConnection.java:596*) at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(* HttpConnection.java:1066*) at org.eclipse.jetty.http.HttpParser.parseNext(*HttpParser.java:897*) at org.eclipse.jetty.http.HttpParser.parseAvailable(* HttpParser.java:218*) at org.eclipse.jetty.server.HttpConnection.handle(* HttpConnection.java:426*) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(* SelectChannelEndPoint.java:510*) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.access$000(* SelectChannelEndPoint.java:34*) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(* SelectChannelEndPoint.java:40*) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(* QueuedThreadPool.java:450*) at java.lang.Thread.run(*Thread.java:619*) Caused by: *com.ctc.wstx.exc.WstxIOException*: null at com.ctc.wstx.sw.BaseStreamWriter.writeCharacters(* BaseStreamWriter.java:511*) at org.apache.cxf.staxutils.StaxUtils.copy(*StaxUtils.java:474*) at org.apache.cxf.staxutils.StaxUtils.copy(*StaxUtils.java:452*) at org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor$SAAJOutEndingInterceptor.handleMessage( *SAAJOutInterceptor.java:206*) ... 24 more Caused by: *org.eclipse.jetty.io.EofException* at org.eclipse.jetty.server.HttpOutput.write(*HttpOutput.java:148*) at org.eclipse.jetty.server.HttpOutput.write(*HttpOutput.java:92*) at org.apache.cxf.io.AbstractWrappedOutputStream.write(* AbstractWrappedOutputStream.java:46*) at com.ctc.wstx.io.UTF8Writer.write(*UTF8Writer.java:139*) at com.ctc.wstx.sw.BufferingXmlWriter.flushBuffer(* BufferingXmlWriter.java:1103*) at com.ctc.wstx.sw.BufferingXmlWriter.writeRaw(* BufferingXmlWriter.java:255*) at com.ctc.wstx.sw.BufferingXmlWriter.writeCharacters(* BufferingXmlWriter.java:543*) at com.ctc.wstx.sw.BaseStreamWriter.writeCharacters(* BaseStreamWriter.java:509*) ... 27 more On Fri, Aug 19, 2011 at 5:24 PM, Blue Diamond <gvnan...@gmail.com> wrote: > *Please let me know if this issue was resolved in later versions of 2.3.x. > * > > I am facing a socket issue with CXF 2.3.0. My service request takes around > 10 minutes so I have set my socket time out on the client side. But when the > service sends response, I see the following exception on the client side. No > exception on the server. > > NOTE: This problem only occurs when WS-Security is engaged. On plain web > service endpoints it works fine even with large delays. > > Client uses Dispatch<Source> model. > > Aug 19, 2011 5:09:32 PM org.apache.cxf.phase.PhaseInterceptorChain > doDefaultLogging > WARNING: Interceptor for { > http://ns.ca.com/catalyst/node}NodeX509#{http://cxf.apache.org/jaxws/dispatch}Invokehas > thrown exception, unwinding now > org.apache.cxf.interceptor.Fault: Could not send Message. > ....... > Caused by: java.net.SocketException: SocketException invoking > http://0.0.0.0:9900/nodex509/ModuleInstance: Unexpected end of file from > server > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) > at > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) > at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > at > org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:1995) > at > org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1980) > at > org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56) > at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:662) > at > org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62) > ... 10 more > Caused by: java.net.SocketException: Unexpected end of file from server > at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:769) > at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632) > at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:766) > at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632) > at > sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1064) > at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:373) > at > org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2102) > at > org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2071) > at > org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1925) > ... 13 more > [com.ca.ucf.remote.ws.client.WSModuleProxy] : Could not add SOAP header > elements > javax.xml.ws.WebServiceException: Could not send Message. > at org.apache.cxf.jaxws.DispatchImpl.mapException(DispatchImpl.java:244) > at org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:339) > at org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:218) > at com.ca.garan10.test.RunTest.main(RunTest.java:11) > Caused by: java.net.SocketException: SocketException invoking > http://0.0.0.0:9900/nodex509/ModuleInstance: Unexpected end of file from > server > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) > at > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) > at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > at > org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:1995) > at > org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1980) > at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56) > at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:662) > at > org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62) > at > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:247) > at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:516) > at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313) > at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265) > at org.apache.cxf.endpoint.ClientImpl.invokeWrapped(ClientImpl.java:300) > at org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:332) > ... 4 more > Caused by: java.net.SocketException: Unexpected end of file from server > at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:769) > at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632) > at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:766) > at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632) > at > sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1064) > at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:373) > at > org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2102) > at > org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2071) > at > org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1925) > ... 13 more > Exception in thread "main" com.ca.ucf.api.UCFException: Could not send > Message. > at com.ca.garan10.test.RunTest.main(RunTest.java:11) > Caused by: javax.xml.ws.WebServiceException: Could not send Message. > at org.apache.cxf.jaxws.DispatchImpl.mapException(DispatchImpl.java:244) > at org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:339) > at org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:218) > ... 2 more > Caused by: java.net.SocketException: SocketException invoking > http://0.0.0.0:9900/nodex509/ModuleInstance: Unexpected end of file from > server > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) > at > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) > at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > at > org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:1995) > at > org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1980) > at > org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56) > at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:662) > at > org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62) > at > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:247) > at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:516) > at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313) > at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265) > at org.apache.cxf.endpoint.ClientImpl.invokeWrapped(ClientImpl.java:300) > at org.apache.cxf.jaxws.DispatchImpl.invoke(DispatchImpl.java:332) > ... 4 more > Caused by: java.net.SocketException: Unexpected end of file from server > at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:769) > at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632) > at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:766) > at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632) > at > sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1064) > at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:373) > at > org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2102) > at > org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2071) > at > org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1925) > ... 13 more > > > Interestingly the logs reveal that the client actually got the SOAP > response. But something on the CXF client side is closing the channel > incorrectly!!! > > BADLY IN NEED OF A SOLUTION :( > > Thanks, > Anil >