You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Blue Diamond <gv...@gmail.com> on 2011/06/16 15:58:52 UTC

Re: how to increasing Socket timeout

CXF Version used is 2.3.0.


On Thu, Jun 16, 2011 at 6:40 PM, Malisetti, Ramanjaneyulu <
Ramanjaneyulu.Malisetti@ca.com> wrote:

> Hi,
>
>       I have web service client using CXF. My client use Dispatch
> mechanism to make Web Service calls. One of my service is taking long
> time to return, hence I would like to increase the default SO time and
> trying that in the following way. Seems, it is not working. Anything I
> am missing?
>
>
>
>            Client client =
> ((org.apache.cxf.jaxws.DispatchImpl)resourceDataSource).getClient();
>
>            HTTPConduit http = (HTTPConduit) client.getConduit();
>
>            HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
>
>            httpClientPolicy.setConnectionTimeout(36000);
>
>            httpClientPolicy.setReceiveTimeout(36000);
>
>            http.setClient(httpClientPolicy);
>
>
>
> Regards
>
> Raman
>
>

RE: how to increasing Socket timeout

Posted by "Malisetti, Ramanjaneyulu" <Ra...@ca.com>.
Thanks you. It works.

Regards
Raman

-----Original Message-----
From: Willem Jiang [mailto:willem.jiang@gmail.com] 
Sent: Thursday, June 16, 2011 8:02 PM
To: users@cxf.apache.org
Subject: Re: how to increasing Socket timeout

The default receive time is 60000 ms which means 60 second.
You are setting the timeout to be 36 seconds :)

On 6/16/11 9:58 PM, Blue Diamond wrote:
> CXF Version used is 2.3.0.
>
>
> On Thu, Jun 16, 2011 at 6:40 PM, Malisetti, Ramanjaneyulu<
> Ramanjaneyulu.Malisetti@ca.com>  wrote:
>
>> Hi,
>>
>>        I have web service client using CXF. My client use Dispatch
>> mechanism to make Web Service calls. One of my service is taking long
>> time to return, hence I would like to increase the default SO time
and
>> trying that in the following way. Seems, it is not working. Anything
I
>> am missing?
>>
>>
>>
>>             Client client =
>> ((org.apache.cxf.jaxws.DispatchImpl)resourceDataSource).getClient();
>>
>>             HTTPConduit http = (HTTPConduit) client.getConduit();
>>
>>             HTTPClientPolicy httpClientPolicy = new
HTTPClientPolicy();
>>
>>             httpClientPolicy.setConnectionTimeout(36000);
>>
>>             httpClientPolicy.setReceiveTimeout(36000);
>>
>>             http.setClient(httpClientPolicy);
>>
>>
>>
>> Regards
>>
>> Raman
>>
>>
>


-- 
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
          http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang

Re: how to increasing Socket timeout

Posted by Willem Jiang <wi...@gmail.com>.
The default receive time is 60000 ms which means 60 second.
You are setting the timeout to be 36 seconds :)

On 6/16/11 9:58 PM, Blue Diamond wrote:
> CXF Version used is 2.3.0.
>
>
> On Thu, Jun 16, 2011 at 6:40 PM, Malisetti, Ramanjaneyulu<
> Ramanjaneyulu.Malisetti@ca.com>  wrote:
>
>> Hi,
>>
>>        I have web service client using CXF. My client use Dispatch
>> mechanism to make Web Service calls. One of my service is taking long
>> time to return, hence I would like to increase the default SO time and
>> trying that in the following way. Seems, it is not working. Anything I
>> am missing?
>>
>>
>>
>>             Client client =
>> ((org.apache.cxf.jaxws.DispatchImpl)resourceDataSource).getClient();
>>
>>             HTTPConduit http = (HTTPConduit) client.getConduit();
>>
>>             HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
>>
>>             httpClientPolicy.setConnectionTimeout(36000);
>>
>>             httpClientPolicy.setReceiveTimeout(36000);
>>
>>             http.setClient(httpClientPolicy);
>>
>>
>>
>> Regards
>>
>> Raman
>>
>>
>


-- 
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
          http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang