One simple way to do this is to use the result and fault handlers in the
service, put an identifying key in the asyncToken on send, extract that key
in the result, and use it in a switch to determine processing.

 

Tracy Spratt,

Lariat Services, development services available

  _____  

From: [email protected] [mailto:[email protected]] On
Behalf Of trefalgar
Sent: Tuesday, January 19, 2010 2:03 PM
To: [email protected]
Subject: [SPAM] [flexcoders] Re: Flex, SOAP and Process Flow

 

  

--- In flexcod...@yahoogro <mailto:flexcoders%40yahoogroups.com> ups.com,
"trefalgar" <trefal...@...> wrote:
>
> --- In flexcod...@yahoogro <mailto:flexcoders%40yahoogroups.com> ups.com,
"Amy" <amyblankenship@> wrote:
> > I always use mx.rpc.Responder instead of AsyncResponder (is that a
custom class?). There's a working example of using AsyncToken with AMFPHP
here http://flexdiary.
<http://flexdiary.blogspot.com/2009/01/lazy-loading-tree-example-file-posted
.html> blogspot.com/2009/01/lazy-loading-tree-example-file-posted.html .
Maybe that will help you see something the docs aren't showing you.
> 
> var token:AsyncToken =
myService.disableStatistics(user,pass,email,tArray);
> token.info = email;
> token.addResponder(new AsyncResponder(myResults,myFaults,token));

I forgot this little bit - using Responder over AsyncResponder. As far as I
can tell, it's not a custom class as it's included by default in the SDK. 

As far as usage, if I use Responder over AsyncResponder, I get the following
error:

1067: Implicit coercion of a value of type flash.net:Responder to an
unrelated type mx.rpc:IResponder.

I'll see if I can figure that out, but AsyncTokens definitely don't seem to
like me.

Tref



Reply via email to