Use trace() to display the xml content you are getting back from the WebService, so you can see exactly how to build the dataProvider expression... oops, you can't, because you are binding to lastResult. Consider using a result handler instead..
Also, specify resultFormat="e4x". The default converts your xml to a nested object structure of some sort. Tracy ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Brian Sent: Friday, November 09, 2007 3:40 PM To: [email protected] Subject: [flexcoders] DataGrid not populating from WebService, error: Unknown Property OK I'm back with my next WebService question. I got one working when there was only one object coming back. Now I'm trying to populate a DataGrid with the lastResult from a WebService and I'm getting an Unknown Property error. I've searched for this here and am wondering if I either need a [] somewhere in the dataProvider or I need to put the result into an ArrayCollection first and then set the dataProvider to that. Or could it be that the OrdMedList element doesn't have a namespace like all the other elements? That's due to a weird issue with CXF and JAX-WS. Here's the error: Error: Unknown Property: 'OrdMedList'. at mx.collections::ListCollectionView/http://www.adobe.com/2006/actionscrip t/flash/proxy::getProperty <http://www.adobe.com/2006/actionscript/flash/proxy::getProperty> () Here's my mxml: <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml <http://www.adobe.com/2006/mxml> " layout="absolute"> <mx:WebService id="ordMedSearchWS" wsdl="http://localhost:8080/OrderWeb/services/OrdMed?wsdl <http://localhost:8080/OrderWeb/services/OrdMed?wsdl> " showBusyCursor="true"> <mx:operation name="searchStartsWith"> <mx:request> <searchText>{ordMedSearchText.text}</searchText> </mx:request> </mx:operation> </mx:WebService> <mx:HBox x="10" y="70"> <mx:Label text="OrdMed Search" /> <mx:TextInput id="ordMedSearchText" width="100" /> <mx:Button label="Search" click="ordMedSearchWS.searchStartsWith.send()" /> <mx:Label /> </mx:HBox> <mx:DataGrid x="10" y="100" id="ordMeds" width="400" dataProvider="{ordMedSearchWS.searchStartsWith.lastResult.OrdMedList.Ord Med}"> <mx:columns> <mx:DataGridColumn headerText="Id" dataField="id" /> <mx:DataGridColumn headerText="Desc" dataField="desc" width="150" /> </mx:columns> </mx:DataGrid> </mx:Application> Here's my WebService response: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/> "> <soap:Body> <ns1:searchStartsWithResponse xmlns:ns1="http://services.project.company.com/ <http://services.project.company.com/> "> <OrdMedList> <ns2:OrdMed xmlns:ns2="http://services.project.company.com <http://services.project.company.com> "> <desc xmlns="http://services.project.company.com <http://services.project.company.com> ">Tylenol</desc> <id xmlns="http://services.project.company.com <http://services.project.company.com> ">7611</id> </ns2:OrdMed> <ns2:OrdMed xmlns:ns2="http://services.project.company.com <http://services.project.company.com> "> <desc xmlns="http://services.project.company.com <http://services.project.company.com> ">Acetaminophen</desc> <id xmlns="http://services.project.company.com <http://services.project.company.com> ">7612</id> </ns2:OrdMed> <ns2:OrdMed xmlns:ns2="http://services.project.company.com <http://services.project.company.com> "> <desc xmlns="http://services.project.company.com <http://services.project.company.com> ">Advil</desc> <id xmlns="http://services.project.company.com <http://services.project.company.com> ">7613</id> </ns2:OrdMed> </OrdMedList> </ns1:searchStartsWithResponse> </soap:Body> </soap:Envelope>

