Hi Everyone,

 

            I was able to figure out how to set timeout & maintain
session in Axis2 from a client.

            

            Here is how it is done ...

            

            To set the maintain session in the client code which is
accessing the web service

            Axis 1.x 

            stub.setMaintainSession(true)

            

            Axis2

 
stub._getServiceClient().getOptions().setManageSession(true);

            

            To set the timeout in the client code which is accessing the
web service (default timeout is 60 seconds, so if a webservice operation
takes more than 60 seconds, then the client will timeout with an
exception saying "Read timed out")

            Axis 1.x

            stub.setTimeout(timeoutInMilliSeconds)

            

            Axis2

 
stub._getServiceClient().getOptions().setTimeOutInMilliSeconds(timeoutIn
MilliSeconds);

 

Thanks

Raghu

 

________________________________

From: Raghu Upadhyayula [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 17, 2007 5:11 PM
To: axis-user@ws.apache.org
Subject: How to set timeout & maintain session in Axis2 from a client.?

 

Hi, 

 

            In Axis 1.x I used to set the timeout & maintain session
from the client code using the following code.

            

            stub.setMaintainSession(true)  &
stub.setTimeout(timeOutInMilliSeconds)

            

            How do we set this in Axis2?.  I don't see these methods in
the Stub (org.apache.axis2.client.Stub) class anymore.

 

Thanks

Raghu

Reply via email to