Posts in Category "Service Client"

Configurable request timeout for client side SOAP calls

Have you tried making calls to LiveCycle over SOAP, that resulted in read timeout exception on the client? This could happen, for instance if the service method you are trying to invoke just takes too long to execute.  Wish you could control the timeout for such calls? Read on for how this can be done  …

The current LiveCycle ES4 release allows you to configure the LiveCycle Service Client request time-out when the invocations are done via SOAP. This can be done by passing a new property DSC_REQUEST_TIMEOUT (present in ServiceClientFactoryProperties class) to Service Client Factory. It represents the request call timeout (in milliseconds). By default, internally this timeout is 15 minutes (same as the last release).

Let’s say you want to set the request time out for invocation of a service method to 20 minutes. The essence here is how the Service Client Factory gets created. Let’s see how:

Properties cxnProperties = new Properties();
ServiceClientFactory mySCFactory = null; 
ServiceClient myServiceClient = null;

cxnProperties.setProperty("DSC_DEFAULT_SOAP_ENDPOINT", "http://myLCServer:8080");
cxnProperties.setProperty("DSC_TRANSPORT_PROTOCOL", "SOAP"); 
cxnProperties.setProperty("DSC_SERVER_TYPE", "JBoss");
cxnProperties.setProperty("DSC_REQUEST_TIMEOUT", "1200000");  // 20 minutes
cxnProperties.setProperty("DSC_CREDENTIAL_USERNAME", "Administrator");
cxnProperties.setProperty("DSC_CREDENTIAL_PASSWORD", "myPassword");

mySCFactory = ServiceClientFactory.createInstance(cxnProperties);

Now, you can pass this Service Client Factory to the code that invokes the service method. For a more elaborate article on how to invoke LiveCycle via SOAP, check out: