Hi,
don't know how to do 2) but here's how you can do 1)
Calling a method on the WS stub returns an instance of mx.services.PendingCall.
You can then assign the methods you want to invoke when the onResult/onFault
callbacks of the PendingCall are called by using the Delegate class.
i.e.
import mx.services.PendingCall;
import mx.utils.Delegate;
private function invokeSomeMethod():Void {
// set up the call and the handlers
var pc:PendingCall = ws.oneMethod(param1, param2);
pc.onResult = Delegate.create(this, handleResult);
pc.onFault = Delegate.create(this, handleFault);
}
// later on
private function handleResult(event:Object):Void {
// do your stuff here...
}
private function handleFault(event:Object):Void {
// do your stuff here...
}
Dirk.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/