title: JBoss 7 JAX-WS java.net.SocketException: Unexpected end of file from server
body: <p>i have a intermittent problem with my WebService after a JBoss upgrade from 5 to 7. I'am using Apache CXF 2.6.6 and Java 1.7_u67. About 90% of the webservice requests get an response from the server. But sometimes the webservice client gets a SocketException: Unexpected end of file from server. </p>
  
  <p>I tried to evoke the problem using SoapUI, but this failed. With SoapUI the webservice works fine about all the time. I figured out that there is no incoming soap request on server side when the client gets the exception (JBoss root logging = Trace and Apache CXF logging is enabled / No new entries in the log files).</p>
  
  <p>Then i tried something else: Between each webservice request fromt the client i've waited about 60sec. and i got no exception. My conclusion is that there must be a problem with the http connector or http connection. Maybe i can define a timeout or something else?!</p>
  
  <p>How can i fix the problem with JBoss7? I think its a JBoss configuration issue. </p>
  
  <pre><code>Caused by: javax.xml.ws.WebServiceException: Could not send Message.
  at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:145) [cxf-rt-frontend-jaxws-2.6.6-redhat-3.jar:2.6.6-redhat-3]
  at com.sun.proxy.$Proxy45.sucheReklamationen(Unknown Source)
  ... 60 more 
  
  Caused by: java.net.SocketException: SocketException invoking http://WEBSERVICEURL/WebserviceImpl: Unexpected end of file from server
  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.7.0_67]
  at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) [rt.jar:1.7.0_67]
  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.7.0_67]
  at java.lang.reflect.Constructor.newInstance(Constructor.java:526) [rt.jar:1.7.0_67]
  at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:1469) [cxf-rt-transports-http-2.6.6-redhat-3.jar:2.6.6-redhat-3]
  at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1454) [cxf-rt-transports-http-2.6.6-redhat-3.jar:2.6.6-redhat-3]
  at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56) [cxf-api-2.6.6-redhat-3.jar:2.6.6-redhat-3]
  at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:659) [cxf-rt-transports-http-2.6.6-redhat-3.jar:2.6.6-redhat-3]
  at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62) [cxf-api-2.6.6-redhat-3.jar:2.6.6-redhat-3]
  at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262) [cxf-api-2.6.6-redhat-3.jar:2.6.6-redhat-3]
  at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530) [cxf-api-2.6.6-redhat-3.jar:2.6.6-redhat-3]
  at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:463) [cxf-api-2.6.6-redhat-3.jar:2.6.6-redhat-3]
  at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:366) [cxf-api-2.6.6-redhat-3.jar:2.6.6-redhat-3]
  at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:319) [cxf-api-2.6.6-redhat-3.jar:2.6.6-redhat-3]
  at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96) [cxf-rt-frontend-simple-2.6.6-redhat-3.jar:2.6.6-redhat-3]
  at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:134) [cxf-rt-frontend-jaxws-2.6.6-redhat-3.jar:2.6.6-redhat-3]
  ... 61 more
  
  Caused by: java.net.SocketException: Unexpected end of file from server
  at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:772) [rt.jar:1.7.0_67]
  at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:633) [rt.jar:1.7.0_67]
  at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1323) [rt.jar:1.7.0_67]
  at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468) [rt.jar:1.7.0_67]
  at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1606) [cxf-rt-transports-http-2.6.6-redhat-3.jar:2.6.6-redhat-3]
  at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1532) [cxf-rt-transports-http-2.6.6-redhat-3.jar:2.6.6-redhat-3]
  at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1440) [cxf-rt-transports-http-2.6.6-redhat-3.jar:2.6.6-redhat-3]
  ... 71 more
  </code></pre>