Strange.  Any chance it is your dynamic listener manipulation?  That is
the only odd thing I see. (why are you doing that, by the way?) I mostly
use HTTPService, and had an app the fired off over 90 calls on init and
never lost any of them.  I used a single HTTPService instance and a
single result handler.  I even counted the calls on send(), and
decremented the count in the handler to know when they were complete.

 

Tracy

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Fred Barrett
Sent: Friday, September 28, 2007 5:29 PM
To: [email protected]
Subject: [flexcoders] Back-toback WebService calls seem to get lost?

 

I have some back-to-back web service calls that don't seem to work
when I call them as:

ws.GetMusicians();
ws.GetInstruments();
ws.GetProducts();

but if I call them in a forced-sequential pattern, they all work fine.
(The web server is a .NET service that returns ArrayCollections).

My mxml file calls my GAWebService tier:
var ws = new GAWebService();

The GAWebService tier handles the transaction with the web service:

public function GetInstruments( ):void {
ws.addEventListener( ResultEvent.RESULT, instrumentsHandler );
var callToken:AsyncToken = ws.GetInstruments();
callToken.marker = "GetInstrumentsCall";
}

private function instrumentsHandler( event:ResultEvent ):void {
ws.removeEventListener( ResultEvent.RESULT, instrumentsHandler );
var callToken:AsynchToken = event.token;
var resultCollection:ArrayCollection = (event.result AS
ArrayCollection);
switch( callToken.toString() ) {
case "GetInstrumentsCall":
GADataModel.getInstance().Instruments = resultCollection;
break;
etc.
}
}

Again, if I force a sequence wherein the handler of one call makes the
next webservice call in the series, I get all of the results back, but
if I leave it to the "asynch-ness" of the webservice, I only get a
couple of the calls completed.

Does the Flex WebService queue up the calls or do I have to write some
sort of call queue class in order to manage the asynchronous traffic?

 

Reply via email to