Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 3 Jahren, 2 Monaten
Letzter Beitrag:
vor 3 Jahren, 2 Monaten
Beteiligte Autoren:
Steven Sitas, Fabrice Harari, Allard

Webservices (WX19)

Startbeitrag von Steven Sitas am 08.04.2015 16:31

Do I have to implement my database connection initialization code INSIDE every Webservice procedure OR is it OK to leave it at the project code (initializing...)?

Although I can see, with the help of trace, that the project code RUNs everytime I call a webservice, I am getting some strange results, specially when using HChangeDir with local HFSQL databases

Steven Sitas



Well If you import a webservice you can acces it like any other procedure. You could use a webservice and no database as well.

I guess it is calling the ini code to initiate, maybe internally the imported webservice needs be initiated as well ? And that me be the reason why it runs it.?

Maybe other forum members know more about this?

I have made connections to webservices in the past and never included tthe connection to db


von Allard - am 08.04.2015 16:52
Hi Allard,
Sorry for the confusion ...
This is a WEBService that I developed with WD 19.

So I am having trouble with MY code in MY webservice, in the webservice code.
Not in the code that calls the webservice

Steven Sitas

von Steven Sitas - am 08.04.2015 17:07
Hi Steven

most of the time, the "strange results" in a webservice come from the fact that the user running the webservice does not have the appropriate rights (in your case, the hchangedir may try to connect to a directory where this user has NO rights)

Best regards

von Fabrice Harari - am 08.04.2015 18:06
Hi Fabrice,
thanks for the TIP.
I will change my testing to HFSQL, so I can bypass the hchangeDir rights problem.

Is it OK to initialize/open/connect to the database ONCE at the project code (of the WEBService) or should I do it at every webservice procedure ?

thanks again for your help

Steven Sitas

von Steven Sitas - am 09.04.2015 09:11
Hi steven

AFAIK, it is the standard way of coding for a webservice too... The project init code is run every time for a reason.

Best regards

von Fabrice Harari - am 09.04.2015 11:55
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.