I have written a php extension DLL that is called from the php code. One of the functions I provide essentially puts the calling thread to sleep until something server event happens. (This is in my DLL, where i use the Windows WaitForMultipleObjects() function).
Waiting here could take a long time, or potentially never happen.
If the even happens, the call into the extension completes, and the php page is provided back to the flex app, which
then calls the completion code for the HTTPSerivce.
This all works fine, until the flex application tries to make another access to waitforsomething.php while a previous
access has still not completed. In this case, waitforsomething.php doesn't get called at all. Only when the previous call completes, does the next call come in.
By playing around, i notice that if i add contentType="application/xml" to the HTTPService request, then it all works
as expected, and i can have multiple calls to the server. Remove it, and I am back to only ever having one call at
I realise that adding contentType="application/xml" is not correct for what i am doing, but why does it make it work?
What is the correct solution to this type of problem? Am I looking at some kind of cache issue?
<!-- resultFormat tells the HTTPService how to deserialize the result of the HTTP request. By default, the response is deserialized into an object graph. This allows you to navigate through the service result using the dot notation. You can also get the result as an XML document by specifying resultFormat="e4x" on the HTTPService. In that case, you can parse the document using E4X (ECMAScript for XML). --> <mx:HTTPService id="srv" url="items.xml" resultFormat="e4x"/>