Expand my Community achievements bar.

Trace shows good data but it is inaccessible...

Avatar

Level 1

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...

2 Replies

Avatar

Level 3

Could you post a bit of the trace data?

Avatar

Level 1

Here is the result showing good data originally in a single string, not broken into XML tags of course... The structure corresponds to the expected WSDL definition.

Encoded SOAP response

<?xml version="1.0" encoding="UTF-8"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns1="urn:dustyIMSTNS">

<soap:Body>

<getIMSStuffResponse xmlns="urn:dustyIMSTNS">

<imsprogramout>

<imsProgramOut>

<outputData>

<outDataType>

<outLastName>BROWN</outLastName>

<outFirstName>GEORGE</outFirstName>

<outExtension>00000000</outExtension>

<outZipCode>75225</outZipCode>

</outDataType>

</outputData>

</imsProgramOut>

</imsprogramout>

</getIMSStuffResponse>

</soap:Body>

</soap:Envelope>

Thanks for your interest in helping...