0

My HTTPService resultHandler is firing twice. Is that normal? The messageId and token# are the same. StatusCode=200 both times.

I've examined the traffic in Fiddler and only one request is being submitted. Here's a code snippet; I've put a breakpoint on the service send() method and it is happening only once.

    var token: AsyncToken;
    var myResponder : AsyncResponder = new AsyncResponder(onResult, onFault);
    token=myHTTPService.send();   
    token.addResponder(myResponder);

    private  function  onResult(e:ResultEvent , token:Object=null):void {
        **// we enter this function twice**
    }
Tim
  • 429
  • 6
  • 19

2 Answers2

0

Turns out to be a bug. http://bugs.adobe.com/jira/browse/SDK-22883

Tim
  • 429
  • 6
  • 19
0

I am facing this problem as well! I guess the solution is to move on to Flex3.5.. thats what the bug tracking page says when I saw it today 17/feb/2010

Vatsala
  • 889
  • 1
  • 8
  • 22
  • Just wire-up a dummy eventhandler for the result and fault, and you can continue to use the AsyncResponder. // these handler stubs are necessary because of http://bugs.adobe.com/jira/browse/SDK-22883 this.addEventListener(FaultEvent.FAULT,onFaultEventHandler); this.addEventListener(ResultEvent.RESULT,onResultEventHandler); protected function onFaultEventHandler(e:FaultEvent): void{}; protected function onResultEventHandler(e:ResultEvent):void {}; – Tim Feb 17 '10 at 15:10