You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Ashish Kulkarni <as...@gmail.com> on 2009/09/30 19:22:55 UTC

how to set timeout in axis 1.4 web service client

HiHow 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
www.mysoftwareneeds.com

Re: how to set timeout in axis 1.4 web service client

Posted by Ashish Kulkarni <as...@gmail.com>.
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 <jo...@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 <ba...@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

Re: how to set timeout in axis 1.4 web service client

Posted by José Ferreiro <jo...@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 <ba...@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

Re: how to set timeout in axis 1.4 web service client

Posted by Ashish Kulkarni <as...@gmail.com>.
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 <ba...@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

Re: how to set timeout in axis 1.4 web service client

Posted by Bauer Horscht <ba...@gmx.de>.
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>