Have you set resultFormat="e4x"?  If not, you are not working with xml.
Flex has generated a tree of dynamic objects.  Though it allows you to
go straight to an arrayCollection, this format is rarely desirable.

 

Set the resultFormat, then in your result handler do:

var xmlResult = event.result as XML;

trace(xmlResult.toXMLString);

 

You will see your xml as flex sees it.

 

Be aware that you may have xml namespace issues accessing the nodes via
e4x expressions.  Google, check archives and see the docs for help with
this.

 

Tracy

 

________________________________

From: [email protected] [mailto:[email protected]] On
Behalf Of Louise Rains
Sent: Wednesday, December 17, 2008 9:28 AM
To: [email protected]
Subject: [flexcoders] data returned from WSDL call

 

I'm getting data back from a wsdl call that looks like this:

 

<?xml version="1.0" encoding="windows-1252"?> <ns0:ROOT
xmlns:ns0="urn:AMAT_Asset_KeyGen" xmlns:xsd="

http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> "
xmlns:xsi="

http://www.w3.org/2001/XMLSchema-instance
<http://www.w3.org/2001/XMLSchema-instance> ">

<ns0:getListValues>

<ns0:B_License_Key>0200362</ns0:B_License_Key>

<ns0:B_Warranty_End_Date>2007-03-31T00:00:00-04:00</ns0:B_Warranty_End_D
ate>

 

<ns0:Company_Name>SOME COMPANY</ns0:Company_Name>

<ns0:Part_Number>ALFLSS3300-1400</ns0:Part_Number>

<ns0:Product_Category>PER</ns0:Product_Category>

<ns0:Product_Type>AUTOMOD</ns0:Product_Type>

<ns0:Quantity>1.000000</ns0:Quantity>

<ns0:Site_Name>SOME SITE</ns0:Site_Name>

 </ns0:getListValues> 

...

<ns0:ROOT>

 

If I have multiple <getListValues> returned, I can use an
ArrayCollection and step through each object in the collection to get
the data.  However, I'm having a hard time determining the type of
event.result in the case where there is only one <getListValues> object
returned.  When I trace event.result, I get [object Object].  If I try
to cast it to XML, XMLList or ArrayCollection, I get null objects.  

 

Is there a way to use reflection to determine what the [object Object]
really is?  How can I access the data that's coming back?

 

Thanks!

 

LG Rains

 

Reply via email to