Hi All,
I am in the process of exploring Flex and now I have got stuck when connecting to a webservice
I get the following error
Cannot assign operations into an RPC Service (WSDL)
Please note that I am able to access the web service defined in the URL properly in browser.
Below is the code
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx=http://www.adobe.com/2006/mxml layout="absolute">
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.rpc.events.ResultEvent;
[
Bindable]
private var myData:ArrayCollection;
private function getData():void
{
myService.GetCategories();
}
private function resultHandler(event:ResultEvent):void
{
myData= event.result.Tables.Table0.Rows
as ArrayCollection;
}
]]>
</mx:Script>
<mx:WebService id="myService" WSDL="http://localhost/FirstWS/Service1.asmx?WSDL"
load="getData()" result="resultHandler(event)"
/>
<mx:DataGrid dataProvider="{myData}"/>
</mx:Application>
</mx:Application>