Time out issues with AXIS
I am using AXIS API in WebLogic 6.1 version to talk to a .NET Web service. Everything works fine, except I am running into timeout issues. AXIS is timing out as the .NET Web service is not responding quickly in certain instances. I am using _call.setProperty ("axis.connect.timeout", new Integer(216000)); to set the timeout in my stub class that is generated by the WSDL2Java utility. It doesn't seem to take this value. It is still timing out in about 40 secs.

    Requires Free Membership to View

    When you register, you'll begin receiving targeted emails from my team of award-winning writers. Our goal is to keep you informed on recent service-oriented architecture (SOA) and SOA-related topics such as integration, governance, Web services, Cloud and more.

    Hannah Smalltree, Editorial Director

    By submitting your registration information to SearchSOA.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchSOA.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

According to the Axis FAQs (http://ws.apache.org/axis/faq.html#faq17), you should set the property within the stub as follows:

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

FooServiceLocator loc = new FooServiceLocator();
 FooService binding = loc.getFooService();
 org.apache.axis.client.Stub s = (Stub) binding;
 s.setTimeout(1000);  // 1 second, in milliseconds

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.


This was first published in September 2004