Q: How do I set a timeout when using { { { WSDL2Java } } } stubs?

A: There is a setTimeout method on the org.apache.axis.client.Stub class, which is the class all emitted stubs extend.

Here is how to set the timeout given a service named Foo:

{{{ { { { FooServiceLocator loc = new FooServiceLocator(); } } }

The default timeout in Axis 1.1 and later is 60 seconds. Axis 1.0 did not have a default timeout (i.e. it defaulted to 0). This timeout value is set on the HTTP socket and is not a connection timeout, which requires implementation we do not have as of Axis 1.1.

JavaTimeout (last edited 2009-09-20 23:31:58 by localhost)