bowser
22nd October 2007, 18:13
Hi all,
In a standalone application, I can successfully use QHttp to communicate with a backend server.
Now I'm trying to publish this communication as a QDS service. Basically, the same code (signal connecting, same slots etc) was transfered to the server.
The service uses a utility class that executes this QHttp object successfully and retrieves the information I want, though it generates two requestFinished signals.
The first is right after http->request() and returns a "" string
The second takes a bit longer (as expected) and returns the desired information.
I have tried placing the following after http->request():
while (!reponseRetrieved) {
loop.processEvents(QEventLoop::AllEvents); // with other parameter variations
}
But the signal is still executing twice. I'm trying to synchronize the http so the service returns the information correctly.
Any reason for this behavior?
In a standalone application, I can successfully use QHttp to communicate with a backend server.
Now I'm trying to publish this communication as a QDS service. Basically, the same code (signal connecting, same slots etc) was transfered to the server.
The service uses a utility class that executes this QHttp object successfully and retrieves the information I want, though it generates two requestFinished signals.
The first is right after http->request() and returns a "" string
The second takes a bit longer (as expected) and returns the desired information.
I have tried placing the following after http->request():
while (!reponseRetrieved) {
loop.processEvents(QEventLoop::AllEvents); // with other parameter variations
}
But the signal is still executing twice. I'm trying to synchronize the http so the service returns the information correctly.
Any reason for this behavior?