Web Service Operation
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Script> import mx.collections.ArrayCollection; import mx.rpc.events.ResultEvent; [Bindable] private var contactData:ArrayCollection; private function getContacts():void { myService.getAllContacts(); myService.getAllContacts.addEventListener(ResultEvent.RESULT, resultHandler); } private function resultHandler(event:ResultEvent):void { contactData = event.result as ArrayCollection; } </mx:Script> <mx:WebService id="myService" wsdl="http://localhost/Service.cfc?wsdl"/> <mx:Button label="Get Data" click="getContacts()"/> <mx:DataGrid dataProvider="{contactData}"> <mx:columns> <mx:DataGridColumn dataField="firstName" headerText="First Name"/> <mx:DataGridColumn dataField="lastName" headerText="Last Name"/> </mx:columns> </mx:DataGrid> </mx:Application>