flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christofer Dutz <christofer.d...@c-ware.de>
Subject AW: call two httpservices from onchange event
Date Sun, 21 Dec 2014 11:27:54 GMT
Hi,

both options (calling two bebservices at the same time as well as calling a second on the
response of the first) work niceley in flex.

One thing you have to keep in mind is the context. If you call two webservices at the same
time, you will receive a callback from each of these. If you want to have something like "as
soon as I have responses from both calls" you will have to manually do some magic yourself
as you have no controll over which service replys firts.

What I usually do in these cases is this:
You usually can get an AsynToken when calling an async webservice. You can set any properties
you like on this object. In the result event you can too access this token. So what I do is,
call the (web)services and link the two AsyncTokens and manually do the cheking if a response
is the last to be finished and then process the results.

Chris


-----Urspr√ľngliche Nachricht-----
Von: Angelo Anolin [mailto:angelo.anolin@gmail.com] 
Gesendet: Sonntag, 21. Dezember 2014 00:34
An: users@flex.apache.org
Betreff: Re: call two httpservices from onchange event

You should be able to call both services on the onchange event.

They would both fire up, unless you need one of the values derived from one service prior
to making the other call.

The error you mentioned means that the method you are calling cannot be found.

You can even try to call the service which you mentioned is working twice on the onchange
event just to test it out (passing different values) and debugging the service call.


On Fri, Dec 19, 2014 at 11:02 AM, slmx <sixto.lm@gmail.com> wrote:

> Hi everyone.
>
> How can I call two HTTP services from the same onchange event.
>
> I tried call a second service inside the callback of the first 
> service, but I recived the next error:
> "Call to a possibly undefined method *methodNameHere*"
>
> I working with adobe flex 3.
>
> thanks in advance.
>
>
>
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/call-two-httpservices-f
> rom-onchange-event-tp9270.html Sent from the Apache Flex Users mailing 
> list archive at Nabble.com.
>
Mime
View raw message