2 Replies Latest reply on May 2, 2009 8:55 PM by Birchwood Consulting

    Trace shows good data but it is inaccessible...

    Birchwood Consulting

      I am calling a web service using Actionscript. I receive no errors during the call and when I view a trace using <mx:TraceTarget/> I see the request is being issued correctly and the response is being returned correctly. In the trace, the result is formatted simply as a string but has all of the correct tags and data.

       

      When I try and assign the data in the structure of the event.result.whatever to responseXML (see below), I  get the dreaded Error #1009: Cannot access a property or method of a null object reference. (I'm using 'whatever' here just as a placeholder for the actual structure elements which the Content Assist finds just fine in design time) The errors are runtime only. Using Alerts.show to check, indeed, the variable has a null value. I am instantiating the variable that catches the result similar to:

       

       

       

       

       

      [Bindable]

      Private var responseXML:XML;

       

      private function wsHandler(event:ResultEvent):void

      {

      XML(event.result.whatever);

      }

       

       

       

      I've tried just about every conceivable syntax, type, etc. that I can think of.

       

       

       

      Two questions...

       

       

      Any suggestions how to actually fix this so that I can get access to the data?

       

      How can you access the information presented in the trace programatically?

       

       

      Thanks very much...