Got it!  The solution is due entirely to Arjan van Ham, who recently
Googled a year-and-a-half old variant of my question on the flash-db.com
forum.  Thanks Arjan!

        Now that I see it, the answer is slap-your-forehead obvious.  eval()
to the rescue.

// Replace this ...
var pc:PendingCall = ws[meth].apply(null, param);

// with this ...
var pc:PendingCall = eval("ws." + meth).apply(ws, param);


> At this point, I should be able to slap in Function.apply(),
> like so ...
>
> // THIRD TRY
> import mx.services.*;
> var wsdl:String = "http://www.webservicex.net/uszip.asmx?WSDL";;
> var meth:String = "GetInfoByZIP";
> var param:Array = ["90210"];
> var ws:WebService = new WebService(wsdl);
> var pc:PendingCall = ws[meth].apply(null, param);
> pc.onResult = function(evt) {
>       trace(evt.NewDataSet);
> };
>
> ... but it all falls apart.  If you turn on VERBOSE logging,
> everything rolls along as usual until it hangs on the final
> line ...

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to