hi i am using coldfusion as BACK END, and when i call a web service in
Flex as
[CODE]
<mx:WebService id="Webservice"
wsdl="http://localhost:8500/WebServicesCFC/getResaDetails.cfc?WSDL">
<mx:operation name="getReservationDetails" resultFormat="object"
result="getReservationDetails_result(event)"
fault="getReservationDetails_fault(event)"/>
</mx:WebService>
[/CODE]
My Service returns a query instead of an XML type.(as shown below)
[CODE]
<cffunction name="getReservationDetails" access="remote"
returntype="query">
<cfquery name="qgetReservationDetails"
datasource="#datasource#">
select resa_id,
resa_teen,
resa_free
from reservation_table
where reservation_date = '2008-08-01'
and active =1
</cfquery>
<cfreturn qgetReservationDetails>
</cffunction>
[/CODE]
In Flex, in the result function, I put it as:
[CODE]
[Bindable]
private var reservationDetails_ar:ArrayCollection = new
ArrayCollection();
private function
getReservationDetails_result(evt:ResultEvent):void
{
reservationDetails_ar = evt.result as
ArrayCollection;
getResa_ta.text =
ObjectUtil.toString(reservationDetails_ar);
}
[/CODE]
I normally used this for RemoteObject calls, and Maybe about WSDL,
it's not the same way to tackle it.
1.Is it impossible to tackle the result as an arraycollection and set
the datagrid's dataprovider with the arraycollection??
2. Can you please suggest me a solution?
Thanks for your help.