Bruno Campos
Bruno Campos

Reputation: 153

Https CXF timeout

I'm trying to use a WebService of a payment gateway which uses HTTPS as protocol and i'm using an apache cxf client.

The problem I'm getting timeout to all my requests, but when I use curl to the same WebService I get the response without any problems.

When i log into admin area of the payment gateway, all my tries are there without any errors, so i could say that the problem is somewhere in response.

The stacktrace are down below.

org.apache.cxf.interceptor.Fault: Could not send Message. at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263) at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:510) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:440) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:343) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:295) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:75) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124) at com.sun.proxy.$Proxy1074.authorize(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597)

Caused by: java.net.SocketTimeoutException: Read timed out at jrockit.net.SocketNativeIO.readBytesPinned(Native Method) at jrockit.net.SocketNativeIO.socketRead(SocketNativeIO.java:32) at java.net.SocketInputStream.socketRead0(SocketInputStream.java) at java.net.SocketInputStream.read(SocketInputStream.java:129) at com.sun.net.ssl.internal.ssl.InputRecord.readFully(InputRecord.java:422) at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:460) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:863) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:820) at com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:75) at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) at java.io.BufferedInputStream.read1(BufferedInputStream.java:258) at java.io.BufferedInputStream.read(BufferedInputStream.java:317) at weblogic.net.http.MessageHeader.isHTTP(MessageHeader.java:224) at weblogic.net.http.MessageHeader.parseHeader(MessageHeader.java:148) at weblogic.net.http.HttpClient.parseHTTP(HttpClient.java:468) at weblogic.net.http.HttpURLConnection.getInputStream(HttpURLConnection.java:401) at weblogic.net.http.SOAPHttpsURLConnection.getInputStream(SOAPHttpsURLConnection.java:37) at weblogic.net.http.HttpURLConnection.getResponseCode(HttpURLConnection.java:1005) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1509) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1467) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1375)

Upvotes: 0

Views: 1811

Answers (2)

Bassel Kh
Bassel Kh

Reputation: 1977

Check if you are behind web proxy,that's why it working in curl but not through through Apache CXF.

Upvotes: 0

Henry Neo
Henry Neo

Reputation: 2347

You might want to change the receiveTimeout setting from Apache CXF src and replace the existing cxf-rt-transports-http-version.jar in your server.

See the instructions from Wildfly 8.2/undertow read time out

Upvotes: 0

Related Questions