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 Charl Gerber <ch...@yahoo.com> on 2007/11/06 11:06:34 UTC

Timeout issues

Hi, 

We're using Eclipse 3.3.0 to generate code from
WSDL's. It uses Axis 1.4. 

The code seems to be generated fine and we can compile
it execute the web services fine. However, when the
web service is not available, it just hangs and
doesn't timeout. We have a wrapper transaction in
WebSphere that eventually times out after approx 12
minutes, but why doesn't the Axis client code time
out?

I looked at the generated stub code and if you do a
getTimeout() in the stub, it returns 0. If I put a
setTimeout(15000) in the constructors of the stub, the
call to the web service times out nicely after the
expected 15 seconds with a SocketTimeoutException
message. That's what we want.

I was under the impression that Axis has a default 60
second timeout? Why doesn't this kick in?

Is there a way to set timeouts by not fiddling in the
generated stub code? We want do not want to touch
generated code - its all part of a big ant build
process and a manual step would not be ideal.

Any help or suggestions?

Thanks!

Charl


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


RE: Timeout issues

Posted by Charl Gerber <ch...@yahoo.com>.
Yes thanks, that did the trick.

It was code I took over from someone. He used a Proxy
class generated by Eclipse to get the webservice and
there you couldn't set the timeout. I just threw that
away and get the services directly and then I can do
what I want with it.


--- "Walker, Jeff" <Je...@fmr.com> wrote:

> Charl,
> Why don't you call setTimeout() on the Stub
> reference that you use in
> the client code?
> E.g.
> ...
> ExampleAxisService_ServiceLocator locator = new
> ExampleAxisService_ServiceLocator();
> ExampleAxisServiceSoapBindingStub myStub =
>
(ExampleAxisServiceSoapBindingStub)locator.getExampleAxisService();
> myStub.setMaintainSession(true);
> myStub.setTimeout(1000);
> ...
> 
> Or, if you call the service more dynamically (that
> is, you create a Call
> object yourself) you can set the timeout on the Call
> reference as well.
> You don't need to change the generated stub class.
> -jeff
> 
> 
> 
> -----Original Message-----
> From: Charl Gerber [mailto:charlgerber@yahoo.com] 
> Sent: Tuesday, November 06, 2007 5:07 AM
> To: axis-user@ws.apache.org
> Subject: Timeout issues
> 
> Hi, 
> 
> We're using Eclipse 3.3.0 to generate code from
> WSDL's. It uses Axis 1.4. 
> 
> The code seems to be generated fine and we can
> compile
> it execute the web services fine. However, when the
> web service is not available, it just hangs and
> doesn't timeout. We have a wrapper transaction in
> WebSphere that eventually times out after approx 12
> minutes, but why doesn't the Axis client code time
> out?
> 
> I looked at the generated stub code and if you do a
> getTimeout() in the stub, it returns 0. If I put a
> setTimeout(15000) in the constructors of the stub,
> the
> call to the web service times out nicely after the
> expected 15 seconds with a SocketTimeoutException
> message. That's what we want.
> 
> I was under the impression that Axis has a default
> 60
> second timeout? Why doesn't this kick in?
> 
> Is there a way to set timeouts by not fiddling in
> the
> generated stub code? We want do not want to touch
> generated code - its all part of a big ant build
> process and a manual step would not be ideal.
> 
> Any help or suggestions?
> 
> Thanks!
> 
> Charl
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail:
> axis-user-help@ws.apache.org
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail:
> axis-user-help@ws.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


RE: Timeout issues

Posted by "Walker, Jeff" <Je...@fmr.com>.
Charl,
Why don't you call setTimeout() on the Stub reference that you use in
the client code?
E.g.
...
ExampleAxisService_ServiceLocator locator = new
ExampleAxisService_ServiceLocator();
ExampleAxisServiceSoapBindingStub myStub =
(ExampleAxisServiceSoapBindingStub)locator.getExampleAxisService();
myStub.setMaintainSession(true);
myStub.setTimeout(1000);
...

Or, if you call the service more dynamically (that is, you create a Call
object yourself) you can set the timeout on the Call reference as well.
You don't need to change the generated stub class.
-jeff



-----Original Message-----
From: Charl Gerber [mailto:charlgerber@yahoo.com] 
Sent: Tuesday, November 06, 2007 5:07 AM
To: axis-user@ws.apache.org
Subject: Timeout issues

Hi, 

We're using Eclipse 3.3.0 to generate code from
WSDL's. It uses Axis 1.4. 

The code seems to be generated fine and we can compile
it execute the web services fine. However, when the
web service is not available, it just hangs and
doesn't timeout. We have a wrapper transaction in
WebSphere that eventually times out after approx 12
minutes, but why doesn't the Axis client code time
out?

I looked at the generated stub code and if you do a
getTimeout() in the stub, it returns 0. If I put a
setTimeout(15000) in the constructors of the stub, the
call to the web service times out nicely after the
expected 15 seconds with a SocketTimeoutException
message. That's what we want.

I was under the impression that Axis has a default 60
second timeout? Why doesn't this kick in?

Is there a way to set timeouts by not fiddling in the
generated stub code? We want do not want to touch
generated code - its all part of a big ant build
process and a manual step would not be ideal.

Any help or suggestions?

Thanks!

Charl


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org