function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
benjasikbenjasik 

Setting Timeouts In Soap Clients

You may come across socket timeouts when using the Salesforce.com system. They occur when the client terminates a connection after a specified period of time. This note contains information on setting the client timeout using Axis and .NET.

The default timeout in Axis 1.1 and later is 60 seconds.

Instructions on how to increase the timeout in Axis are here:

http://ws.apache.org/axis/faq.html#faq17

Make sure you set the timeout after the login call.

In Java, the exception for a client timeout usually looks like this:

java.net.SocketTimeoutException: Read timed out

In .NET, set the client timeout by setting the Timeout property on the generated web service class. The default is 100 seconds. See the below link for more information on setting the timeout in .NET.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebservicesprotocolswebclientprotocolclasstimeouttopic.asp

The exception for a .NET client timeout usually looks like this:

System.Net.WebException: The operation has timed-out.

Message Edited by benjasik on 07-28-2004 03:20 PM

benjasikbenjasik
The 4.0 sample code in the Sforce document to set the timeout in axis is incorrect. It is being set before the login call, and then we reset the binding.

The timeout is being set before the login call, and the binding is being reset.

If you are setting the timeout in this way, move the setTimeout call to after the resetting of the binding

Alternatively, you can reset the URL with the call below which would not reset the timout

binding._setProperty(SoapBindingStub.ENDPOINT_ADDRESS_PROPERTY,
lr.getServerUrl());


We will update the relevant documentation.