You use Flex data access components: HTTPService, WebService, and RemoteObject, to supply data to Flex data provider components. For more information, see Accessing Server-Side Data with Flex.
To use a remote data source to provide data, you represent the result of the remote service with the appropriate object, as follows:
The following code snippet shows this use, casting a list returned by a web service to an Array in an ArrayCollection:
<mx:WebService id="employeeWS" wsdl"http://server.com/service.wsdl"
showBusyCursor="true"
fault="alert(event.fault.faultstring)">
<mx:operation name="getList">
<mx:request>
<deptId>{dept.selectedItem.data}</deptId>
</mx:request>
</mx:operation>
.
.
</mx:WebService>
<mx:ArrayCollection id="ac"
source="mx.utils.ArrayUtil.toArray(employeeWS.getList.lastResult)"/>
<mx:DataGrid dataProvider="{ac}" width="100%">
For more information on using data access component, see Accessing Server-Side Data with Flex.