You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Benjamin Coiffe <bc...@inforsense.com> on 2008/05/26 11:15:18 UTC

setting the synchronous timeout for a soap request broken??

Hello,

I have a Web Service that takes a pretty long time to reply. Therefore,
I extended the timeout on the Client
(((ClientImpl)client).setSynchronousTimeout(Integer.MAX_VALUE)). It used
to work in 2.0.4 but does not in 2.1 since I get the exception below.
Is there any workaround? Is that a bug?

Thanks,

org.apache.cxf.interceptor.Fault: Could not send Message.
	at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingI
nterceptor.handleMessage(MessageSenderInterceptor.java:64)
	at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
hain.java:221)
	at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:286)
	at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:232)
	at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:190)
	at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:210)
	at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:196)
	at java.lang.Thread.run(Thread.java:595)
Caused by: java.net.SocketTimeoutException: Read timed out
	at java.net.SocketInputStream.socketRead0(Native Method)
	at java.net.SocketInputStream.read(SocketInputStream.java:129)
	at
java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
	at
java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
	at
java.io.BufferedInputStream.read(BufferedInputStream.java:313)
	at
sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:606)
	at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:554)
	at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnec
tion.java:940)
	at
java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:367)
	at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResp
onse(HTTPConduit.java:1896)
	at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTP
Conduit.java:1824)
	at
org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutpu
tStream.java:47)
	at
org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:159)
	at
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
	at
org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:583)
	at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingI
nterceptor.handleMessage(MessageSenderInterceptor.java:62)
	... 13 more

Benjamin Coiffe



Re: setting the synchronous timeout for a soap request broken??

Posted by Glen Mazza <gl...@verizon.net>.
Perhaps you should try writing an asynchronous SOAP client.  More
information, first paragraph of here:
http://www.jroller.com/gmazza/date/20080308

HTH,
Glen


2008-05-26 Benjamin Coiffe wrote:
> Hello,
> 
> I have a Web Service that takes a pretty long time to reply. Therefore,
> I extended the timeout on the Client
> (((ClientImpl)client).setSynchronousTimeout(Integer.MAX_VALUE)). It used
> to work in 2.0.4 but does not in 2.1 since I get the exception below.
> Is there any workaround? Is that a bug?
> 
> Thanks,
> 
> org.apache.cxf.interceptor.Fault: Could not send Message.
> 	at
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingI



Re: setting the synchronous timeout for a soap request broken??

Posted by Daniel Kulp <dk...@apache.org>.
Honestly, I'm not sure how this ever would have worked.  The call to  
setSynchronousTimeout is only used when doing syncronous calls over  
async transports.   For the most part, that just means JMS, but the  
local transport as well I think.  It's not used for HTTP as the  
syncronous stuff is handled natively by the protocol itself.    For  
http, you would need to configure the timeouts on the HTTPConduit.

Dan


On May 26, 2008, at 5:15 AM, Benjamin Coiffe wrote:

> Hello,
>
> I have a Web Service that takes a pretty long time to reply.  
> Therefore,
> I extended the timeout on the Client
> (((ClientImpl)client).setSynchronousTimeout(Integer.MAX_VALUE)). It  
> used
> to work in 2.0.4 but does not in 2.1 since I get the exception below.
> Is there any workaround? Is that a bug?
>
> Thanks,
>
> org.apache.cxf.interceptor.Fault: Could not send Message.
> 	at
> org.apache.cxf.interceptor.MessageSenderInterceptor 
> $MessageSenderEndingI
> nterceptor.handleMessage(MessageSenderInterceptor.java:64)
> 	at
> org 
> .apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
> hain.java:221)
> 	at
> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:286)
> 	at
> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:232)
> 	at
> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:190)
> 	at
> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:210)
> 	at
> org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:196)
> 	at java.lang.Thread.run(Thread.java:595)
> Caused by: java.net.SocketTimeoutException: Read timed out
> 	at java.net.SocketInputStream.socketRead0(Native Method)
> 	at java.net.SocketInputStream.read(SocketInputStream.java:129)
> 	at
> java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
> 	at
> java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
> 	at
> java.io.BufferedInputStream.read(BufferedInputStream.java:313)
> 	at
> sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:606)
> 	at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:554)
> 	at
> sun 
> .net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnec
> tion.java:940)
> 	at
> java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:367)
> 	at
> org.apache.cxf.transport.http.HTTPConduit 
> $WrappedOutputStream.handleResp
> onse(HTTPConduit.java:1896)
> 	at
> org.apache.cxf.transport.http.HTTPConduit 
> $WrappedOutputStream.close(HTTP
> Conduit.java:1824)
> 	at
> org 
> .apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutpu
> tStream.java:47)
> 	at
> org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java: 
> 159)
> 	at
> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java: 
> 66)
> 	at
> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:583)
> 	at
> org.apache.cxf.interceptor.MessageSenderInterceptor 
> $MessageSenderEndingI
> nterceptor.handleMessage(MessageSenderInterceptor.java:62)
> 	... 13 more
>
> Benjamin Coiffe
>
>

---
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog