I posted this in Flex Data Services, but that might be the wrong forum--not sure if Flex Data Services refers to some particular Flex thing, like BlazeDS or a similar product. I'm just using a generic SOAP web service.
I've got the following code:
var service:RosterUpdatesService = new RosterUpdatesService();
var token:AsyncToken = service.checkSecurityCode(
// Result event
Alert.show("Got a result!");
// Fault event
Alert.show("Got a fault!");
) // End AsyncResponder constructor parameters
); // End addResponder parameters
// Alert.show("addEventListener works!");
Now, what it's supposed to do is call a web service that I've imported using Flex Builder's web service proxy class code generator (Data->Import Web Service (WSDL)).
I can see via packet capturing, and monitoring what happens on the server, that the call is being made and that data is returned to Flash player. However, neigher of my event handlers ever fires.
I tried using token.addEventListener (as you can see by the commented out code. If I uncomment that code, I get an alert box that pops up. However, I can't seem to get the handlers defined by the AsyncResponder to work.
I've also tried mx.rpc.Responder and mx.collections.ItemResponder (the other two implementations of mx.rpc.IResponder). No luck with either of those.
So, why is it that I can get a response using token.addEventListener but not token.addResponder?
Incidentally, for AMF Flex Remoting services, I've had no trouble with using an IResponder to handle the results...