I am also having trouble with Web Services in Cairngorm 2. The execute
method of my command is being called, but the WS call is not being
made, much less handled correctly. Can someone tell me what I am
missing here?
From Services.xml:
<mx:WebService id="industryAndSizeIdsService" makeObjectsBindable="false"
wsdl="{TestModel.getInstance().appConfigData.client_measures_url.@value
+ '?WSDL'}"
showBusyCursor="true" useProxy="false"
result="event.token.resultHandler(event)"
fault="event.token.faultHandler(event)">
<mx:operation name="GetDataByGrouping" resultFormat="e4x">
<mx:request>
<GroupingRequests>
<GroupName>
RPRToolStaticData
</GroupName>
</GroupingRequests>
</mx:request>
</mx:operation>
</mx:WebService>
And here is the call in my command class:
public class LoadIndustryAndSizeIdsCommand implements Command, Responder
{
public function execute(event:CairngormEvent):void
{
var service:AbstractService =
ServiceLocator.getInstance().getService("industryAndSizeIdsService");
var call:AsyncToken = service.GetDataByGrouping.send();
call.addEventListener(mx.rpc.events.FaultEvent.FAULT, onFault);
call.addEventListener(mx.rpc.events.ResultEvent.RESULT, onResult);
trace("execute");
}
public function onResult(event:* = null):void
{
trace("result");
}
public function onFault(event:* = null):void
{
trace("fault");
}
}
Thanks,
Ben