edit: sorry, now i have the correct version in the signature. The problem still persists but is different now.
Hello community,
I need to request data from a url with an xml response but from within a macro. I have found nothing but the webservice - see example code below. Perhaps you have an alternative solution to the webservice? If not:
URL in question: https://ndcdyn.interactivebrokers.com/U ... 664945&v=3
sub main
svc = createUnoService( “com.sun.star.sheet.FunctionAccess” ) 'Create a service to use Calc functions
XML_String = svc.callFunction(“WEBSERVICE”,array(“https://ndcdyn.interactivebrokers.com/U ... 664945&v=3”))
print XML_String
sub end
If I use it in a browser I receive a success response - however if I use it in the macro I get a fail with Error 1018, this error means “too many requests”. The server on the other side is quite “lenient” and allows requests every few seconds, but the Webservice seems to request very often even though it is one function call. Does anyone know what to do here?
Is it possible to limit the webservice request to try once and then have some code to wait a progressive period of time until the next request is sent?
Thank you very much in advance
HTTP Request / Webservice too many requests / too fast?
HTTP Request / Webservice too many requests / too fast?
Last edited by Hawki on Sun Apr 03, 2022 5:57 pm, edited 2 times in total.
MacOS 10.4 / Libreoffice 7.3
Re: How to use Webservice in Open Office / LibreOffice
Hi,
neither the SimpleFileAccess service nor the WEBSERVICE function allow to specify a User Agent. This is required, however, by your web service.
I suggest doing the access of the webservice in a JavaScript or Python macro. Maybe viewtopic.php?f=45&t=66914 can give you some hints
The OpenOffice UI is still in stoneage. There is no collapsing or autocomplete
Good luck,
ms777
P.S. Please update to a recent version of ApacheOpenOffice or LibreOffice. 2.4 is quite outdated
neither the SimpleFileAccess service nor the WEBSERVICE function allow to specify a User Agent. This is required, however, by your web service.
I suggest doing the access of the webservice in a JavaScript or Python macro. Maybe viewtopic.php?f=45&t=66914 can give you some hints
The OpenOffice UI is still in stoneage. There is no collapsing or autocomplete
Good luck,
ms777
P.S. Please update to a recent version of ApacheOpenOffice or LibreOffice. 2.4 is quite outdated
Re: How to use Webservice in Open Office / LibreOffice
edit: the answer I found does not really work..
Last edited by Hawki on Sun Apr 03, 2022 5:58 pm, edited 1 time in total.
MacOS 10.4 / Libreoffice 7.3
Re: How to use Webservice in Open Office / LibreOffice
Nobody can give valuable answers if you lie about your office version. You are using LibreOffice 6 or 7 otherwise you would not have any WEBSERVICE function. That function can be used directly on sheet without stupid Basic code.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: HTTP Request / Webservice too many requests / too fast?
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: HTTP Request / Webservice too many requests / too fast?
This one does not work unfortunately, I get the same error and on top I need to have it in the macro as I will have to use this result to make another call...
MacOS 10.4 / Libreoffice 7.3
Re: HTTP Request / Webservice too many requests / too fast?
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
-
- Posts: 316
- Joined: Sun Sep 06, 2020 8:27 am
Re: HTTP Request / Webservice too many requests / too fast?
and solved at ask by using external curl instead of WEBSERVICE.
OpenOffice 3.1 on Windows Vista
Re: HTTP Request / Webservice too many requests / too fast?
No, with Firefox, I got same error:Hawki wrote:If I use it in a browser I receive a success response
Co-admin french forum branch