Hi all,
I’m buiding a class to retrieve a result from a webservice call.
everything is working fine except this:
I need to set the return value of callWS equal to onCallResult result
is there any way that i can do this ?
---------------- test sample code
public function callWs(method:String):String {
var pc: PendingCall = ws[method].("arg1","arg2"...argN)
pc.onResult = this.onCallResult;
pc.onFault = this.onCallFault;
return ; [COLOR="DarkOrange"]// here i whant return the onCallResult result[/COLOR]
}
private function onCallFault(fault:Object):Void {
trace("Error> "+fault.faultcode);
trace("Errot faultstring> " +fault.faultstring);
}
private function onCallResult(res:String) {
// [COLOR="darkorange"]this is the result from the webservice call[/COLOR]
trace("result>>> "+res);
//return res;
}
thanks in advance