axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ashish Kulkarni <ashish.kulkarn...@gmail.com>
Subject Re: how to set timeout in axis 1.4 web service client
Date Wed, 30 Sep 2009 18:52:37 GMT
HiThanks, i want to set SocketTimeout, and i did following

AxisClient axisClient = new AxisClient();
AxisEngine engine = axisClient.getClientEngine();
MessageContext messageContext = new MessageContext(engine);
logger.debug("Message context time out " + messageContext.getTimeout());
//Default time out is 10 minutes or 600000 milliseconds
messageContext.setTimeout(120000);

But now how do i use this messageContext in my Stub?

Ashish

2009/9/30 José Ferreiro <jose.ferreiro@a3.epfl.ch>

> Hello Ashish,
>
> In order to complement the previously answer from Bauer, please take a look
> here:
> http://wiki.apache.org/ws/FrontPage/Axis/JavaTimeout
>
> Hope this helps.
>
> José Ferreiro
>
>
> On Wed, Sep 30, 2009 at 8:40 PM, Ashish Kulkarni <
> ashish.kulkarni13@gmail.com> wrote:
>
>> HiThanks, do you have example of getting MessageContext and setting this
>> message context to stub, all i have in my program is
>>
>> ExecutePortTypeBindingStub stub = new ExecutePortTypeBindingStub(new
>> URL(endPoint), null);
>> stub.callMethod(parameter)
>>
>>
>>
>> On Wed, Sep 30, 2009 at 1:34 PM, Bauer Horscht <bauer.horscht@gmx.de>wrote:
>>
>>> In a custom handler, you can directly set it on the MessageContext object
>>> (mc):
>>>
>>> mc.setTimeout(120*1000);   //120 seconds
>>>
>>>
>>>
>>> Ashish Kulkarni schrieb:
>>>
>>>> Hi
>>>> How do we set connection timeout in axis 1.4 web service client, i think
>>>> default is 10 minutes, I want to timeout if web service does not respond
in
>>>> 2 minutes, how can i do so
>>>>
>>>> --
>>>> Ashish
>>>> www.ayurwellness.com <http://www.ayurwellness.com>
>>>> www.mysoftwareneeds.com <http://www.mysoftwareneeds.com>
>>>>
>>>
>>
>>
>> --
>> Ashish
>> www.ayurwellness.com
>> www.mysoftwareneeds.com
>>
>
>
>
> --
> José Ferreiro
> Systems Analysis and Design Specialist
> MSc in Communication Systems, EPFL.
>
> "Think little goals and expect little achievements. Think big goals and win
> big success."  David Joseph Schwartz
>



-- 
Ashish
www.ayurwellness.com
www.mysoftwareneeds.com

Mime
View raw message