+ Start a Discussion
WilmerWilmer 

Scripting Toolkit: Apex Webservice invoking timeout. Is it possible to extend waiting time?

Hi Everybody,

Look, I've been working with Apex webservices (AWS) using the 0.4.9 release of Scripting Toolkit. It works very good. But now I have a special issue and get the following error message:

ERROR: ........... {faultcode:'soapenv:Server', faultstring:'java.lang.Throwable', }

I checked the code and seems to be ok, in fact, it works fine, but eventually when the AWS delays to retrieve a response I get that message and program is interrupted. Is there a way to set Timeout in order to extend the one given by default?
ArtabusArtabus
This seems to be a platform timeout returned as the result of your query.
You should try to change your webservice to make it quicker, perhaps by dealing with less records.
Your webservice could identify if it is reaching the timelimit, returning to your call a value telling that the process has to be continued, and according to this result you will relaunch the webservice, until the job is finished.
Or you could wait for asynchroneous apex which could perhaps avoid this
salesusetosalesuseto
Hi Wilmer,


Can you please tell me how to invoke a scripting toolkit call in Apex code?

I know about call from command prompt like cscript //nologo scriptingtoolkit.wsf.


Thanks in advance.

 papexuser


ArtabusArtabus
If you want to call an Apex Webservice from within a script, just take a look at the help page of the scripting toolkit.
At the bottom, you will see a paragraph "Calling an Apex WebService" with a sample code.
salesusetosalesuseto
Hello Artabus,

Thanks for reply, I will try to use it in my S-control.

Thanks once again...