This content has been marked as final. Show 3 replies
To clarify, If I try to act on data obtained in the event hander code, just after the send call, that data is not valid yet. I want to wait until it is valid so I can do something with it. I could use all kinds of flags but that seems like a hack.
" in the event hander code, just after the send call"
You seem confused, or have confused me.
The function, "wsMethodHandler(event)" is called when the result is returned from the operation. You can only act on the returned data there. It is a separate function and has nothing to do at all with the send();
Maybe post some more code.
Tracy, Thank you for your reply. I am the confused one. Since my original posting, I have researched a lot about Asynchronous communications (ACT), AsyncToken, etc. I understand the basic concepts of the use of a token but the examples I have found do not give me the level of detail that I need for the proper syntax.
I'd like to focus on 1 issue right now. Does anyone know of any good sample code I could look at that demonstrates how to use the AsyncToken to manage multiple calls to a web service through a single WebService object? I have 1 operation that I use to retrieve data from multiple sources. I want to be sure that I am processing data from the correct response.
It has been suggested that I create a separate mx:WebService object for each type of call (and subsequently, a unique result handler. This seems inefficient to me.
Thanks to all for your input.