Apex platform does provide a way to change the default Call time out setting.
Below is the sample code for same -
//Web Service Call out Example
WSTest.WSMethod1 stub = new WSTest.WSMethod1() ;
stub.timeout_x = 20000 ; // timeout in milliseconds
//Http call out example
HttpRequest req = new HttpRequest() ;
req.setTimeOut(20000) ; // timeout in milliseconds
Latest Apex language reference guide also mentions the same.
I thought I read late last year that it was possible to change the 10 second time-out. I'm currently trying to find where I found that reference as I need to extend my system to about 15 seconds.
Steve, I have a related question in addition to what you are tryign to find out. suppose i use a variable i retrieve using a web service in another visual force page's url (i need to load an iframe whose url is appended with session id i am retrieving with this web service); would the page load wait until i get the session id from the call? if not how do i do this? Thanks
found out the variable is not populated to NULL (the page does wait for the associated controller variable to be loaded). Just curious--> would it wait if the variable is part of another class (not the controller OR does VF wait for all referred variables?)
From my experience with getting help from you, I guess you know the internals better. So, please let me know if the page below is listing wrong information. please watch the video on this page ----
"Apex callout time limits have been relaxed to allow calls lasting up to 1 minute. Developers
who want calls to time out sooner can set a custom timeout value.
"
Either way, I guess I will find out when I look at the new API docs.
BTW, where do I look at on the PDFs we download (Force.com library), to know the API vesion number ???
Apex platform does provide a way to change the default Call time out setting.
Below is the sample code for same -
//Web Service Call out Example
WSTest.WSMethod1 stub = new WSTest.WSMethod1() ;
stub.timeout_x = 20000 ; // timeout in milliseconds
//Http call out example
HttpRequest req = new HttpRequest() ;
req.setTimeOut(20000) ; // timeout in milliseconds
Latest Apex language reference guide also mentions the same.
Hi,
Apex platform does provide a way to change the default Call time out setting.
Below is the sample code for same -
//Web Service Call out Example WSTest.WSMethod1 stub = new WSTest.WSMethod1() ; stub.timeout_x = 20000 ; // timeout in milliseconds //Http call out example HttpRequest req = new HttpRequest() ; req.setTimeOut(20000) ; // timeout in milliseconds
Latest Apex language reference guide also mentions the same.
All Answers
I thought I read late last year that it was possible to change the 10 second time-out. I'm currently trying to find where I found that reference as I need to extend my system to about 15 seconds.
Steve Max.
I have a related question in addition to what you are tryign to find out.
suppose i use a variable i retrieve using a web service in another visual force page's url (i need to load an iframe whose url is appended with session id i am retrieving with this web service); would the page load wait until i get the session id from the call?
if not how do i do this?
Thanks
Just curious--> would it wait if the variable is part of another class (not the controller OR does VF wait for all referred variables?)
From a controller class, I call another class which calls the Web Service using a class generated from WSDL.
I haven't had any problems with VisualForce waiting up to 10 seconds for a response.
BTW, Spring '09 has it up at its MAX (60 sec) by default.
UPDATE/ CORRECTION: As Manoj points out below, default is 10s, MAX configurable is 60s.
Default callout timeout in Spring '09 is still 10 sec. But you can set a longer timeout for web services and http callout.
Manoj,
From my experience with getting help from you, I guess you know the internals better. So, please let me know if the page below is listing wrong information. please watch the video on this page ----
http://www.salesforce.com/community/spring09/it/force-integration/compatible-web-services.jsp#
Quoted below is the test from the same page
"Apex callout time limits have been relaxed to allow calls lasting up to 1 minute. Developers who want calls to time out sooner can set a custom timeout value. "
Either way, I guess I will find out when I look at the new API docs.
BTW, where do I look at on the PDFs we download (Force.com library), to know the API vesion number ???
Ya, it is an error in the doc. Default is still 10 sec.
Hi,
Apex platform does provide a way to change the default Call time out setting.
Below is the sample code for same -
//Web Service Call out Example WSTest.WSMethod1 stub = new WSTest.WSMethod1() ; stub.timeout_x = 20000 ; // timeout in milliseconds //Http call out example HttpRequest req = new HttpRequest() ; req.setTimeOut(20000) ; // timeout in milliseconds
Latest Apex language reference guide also mentions the same.