Hi,

I am working with the RCurl package and I am using the curlPerform 
function for an soap-query.
The problem is that the code is usually working well, but sometimes the 
connection gets lost.

So I wrote a while-loop to repeat the query if anything might happened 
so that the same query runs again, but if the query-faults it takes a 
very long time for the repetition.

My question is if there is any possibility to force a time out for the 
curlPerform function or something like that?


Thanks!



             run = 1
             i=0
             while(run==1)
                 {
                     i=i+1
                     try    (
                                              run <- curlPerform(url = 
"http://search.webofknowledge.com/esti/wokmws/ws/WokSearchLite.cgi";,
httpheader=c("Accept-Encoding"="gzip,deflate","Content-Type"="text/xml;charset=UTF-8",'SOAPAction'='""',
"Cookie"=paste('SID="',s_session,'"',sep=""),"Content-Length"=paste(nchar(s_body)),"Host"="search.webofknowledge.com","Connection"="Keep-Alive","User-Agent"="Apache-HttpClient/4.1.1
 
(java 1.5)"),
postfields=s_body,
writefunction = h$update
,verbose = TRUE)
                          ,TRUE)


                     print(i)
                  }




        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to