Thanks, that's the ticket. <mx:WebService> doesn't have a resultFormat attribute, but <mx:operation> does. Setting the operations' resultFormat to "e4x" gave me XML back. I also had to play around with the result to get past the outer layers. It involved the following:
var xmlResultList:XMLList = event.result as XMLList var xmlResult:XML = xmlResultList[0] trace(xmlResult.children()) However, with that said, I'm finding it's actually easier to deal with the tree of dynamic objects. I found something under the comments about the DataGrid object that explains how to handle the return result as either an ObjectProxy or an ArrayCollection. For my purposes turning an ObjectProxy (if that's what I got) into an ArrayCollection and then processing the ArrayCollection is working better than digging through the XML structure. I'm curious to know why you said that going straight to an ArrayCollection is rarely desirable. Can you give me more info on your reasoning behind that? Thanks! LG Rains --- In flexcoders@yahoogroups.com, "Tracy Spratt" <tspr...@...> wrote: > > 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: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On > Behalf Of Louise Rains > Sent: Wednesday, December 17, 2008 9:28 AM > To: flexcoders@yahoogroups.com > 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 >