2 Replies Latest reply on Jan 22, 2007 9:34 AM by Bill White

    Fault during getItem call does not invoke IResponder.fault()

    Duster_IDF
      I'm fetching an item from a DataService:

      // Set the keys of wip
      // ...
      var token:AsyncToken = _dsWip.getItem(wip);
      token.addResponder(new DataResponder(
      function (event:ResultEvent): void { // result handler
      trace("responder result:", event);
      // handle result
      },
      function (info:Object):void { // fault handler
      trace("responder fault:", info);
      // handle fault
      }));

      DataResponder implements mx.rpc.IResponder.

      If the server is able to fetch the item, everything is working as expected - the IResponder.result function is called.

      However, if an error occurs on the server, the IResponder.fault function is never called.
      Data services generates a FaultEvent - I know that because I have registered fault event listeners with other instances in the application. For example, I see this in the trace:
      faultHandler - event: [FaultEvent fault=[RPC Fault faultString="Unable to invoke a get operation on destination 'wip' due to the following error: ..." faultCode="Server.Processing" faultDetail="null"] messageId="1CD8DCBC-1908-DDFA-6961-6748CBB85255" type="fault" bubbles=false cancelable=true eventPhase=2]

      So, there is a fault event as expected, but why is the IResponder.fault function ignored?
      --
      Jürgen Failenschmid