I looked at the response with Charles and with the variables debug window. The response is basically an arrayCollection of arrayCollections.
The following code will display the title of the first data item (Story). You should be able to extrapolate this easily for the rest of the data (ie. a for loop): <?xml version="1.0"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="onCreationComplete()"> <mx:Script> <![CDATA[ import mx.collections.ArrayCollection; import mx.controls.Alert; import mx.rpc.events.ResultEvent; import mx.rpc.events.FaultEvent; import mx.rpc.soap.mxml.*; private var ws:mx.rpc.soap.mxml.WebService; public function onCreationComplete():void { ws = new mx.rpc.soap.mxml.WebService(); ws.endpointURI = "http://www2.med.umich.edu/prmc/media/newsroom/stories.cfc"; ws.loadWSDL("http://www2.med.umich.edu/prmc/media/newsroom/stories.cfc?w\ sdl"); ws.addEventListener(FaultEvent.FAULT, faultHandler); ws.addEventListener(ResultEvent.RESULT, resultHandler); } public function resultHandler(event:ResultEvent):void { var resultArrColl:ArrayCollection = event.result.data; var firstResult:ArrayCollection = resultArrColl[0]; Alert.show(firstResult[0]); } public function faultHandler(event:FaultEvent):void { Alert.show(event.fault.faultString); } public function runRequest():void { ws.listBySubject(); } ]]> </mx:Script> <mx:Button label="Run Request" click="runRequest()"/> </mx:Application> Run this with a breakpoint on the second line of the function resultHandler. You should be able to look at the resultArrColl variable and see that each object in the arrayCollection is itself an arrayCollection. Each object in that arrayCollection has 4 items - linktext, story, photo and defaultLogo. --- In [email protected], "Wally Kolcz" <wko...@...> wrote: > > I am having fits trying to figure out how to use the information coming back from a webservice. I created a web service call in my code: > > <mx:WebService id="storyGateway" wsdl="http://www2.med.umich.edu/prmc/media/newsroom/stories.cfc?wsdl" fault="Alert.show(event.fault.message,'Story Gateway Error')"> > <mx:operation name="listBySubject" result="buildBookHandler(event)" fault="Alert.show(event.fault.message,'Story Gateway Error')" /> > </mx:WebService> > > It returns the data as requested, I can see it in my debugging, but I cannot figure out how to set it to a variable and then call the various elemenets (linkText, story, photo, defaultLogo) > > I tried to set it to a variable as an ArrayCollection: > > [Bindable] > public var storyFeed:ArrayCollection = new ArrayCollection(); > > public function buildBookHandler(e:ResultEvent):void { > storyFeed = e.result as ArrayCollection; > > for (var i:uint = 0; i < e.result.data.length; i++){ > > ... > //Story Area > var storyArea:TextArea = new TextArea(); > storyArea.text = storyFeed.getItemAt(i).story; > storyArea.wordWrap = true; > storyArea.height = 550; > storyArea.width = 400; > storyArea.editable = false; > magPage.addChild(storyArea); > storyArea.x = 0; > storyArea.y = 25; > > ... > > } > rssMag.flipOnClick = true; > } > > But still getting errors.. > TypeError: Error #1009: Cannot access a property or method of a null object reference. > at RSSMagazine/buildBookHandler()[D:\wkolcz\My Documents\Flex Builder 3\RSSMagazine\src\RSSMagazine.mxml:36] > > Line 36 is: > storyArea.text = storyFeed.getItemAt(i).story; > > Help! >

