Purchase your Section 508 Compliance Support guide now!

Purchase your Section 508 Compliance Support guide now!

Cognos SDK -- SOAP Connection Timeout Error in Visual Basic 6.0 Applications

A Visual Basic 6.0 application that extracts a large amount of data may encounter the SOAP error "Connector: Connection timeout." The default timeout for the HTTPConnector30 object of the SOAP Toolkit 3.0 is 30 seconds, which may be insufficient. Visual Basic 6.0 users can modify this limit by using the setTimeout method to increase the timeout. The setTimeout method signature is

Public Function setTimeout(timeout As Long)

where timeout is in milliseconds. This method can be used with all services, including the dispatcher. The following code snippet demonstrates how to set the timeout for the Agent Service to 60 seconds.

Public agServ As AgentService
Set agServ = New AgentService
agServ.endPointUrl = "http://localhost:9300/p2pd/servlet/dispatch"
agServ.setTimeout(60000)