You CAN do this in AS:
private function getEmployees():Void
{
var sOperationName:String = "getList"; //Put the operation name in a
var
var oRequest:Object = employeeWS[sOperationName].request; //get a
reference to the operations request object
oRequest.deptId = dept.selectedItem.data; //put the deptId Name/Value
pair in the request
var call = employeeWS[sOperationName].send(); //Invoke the call
}
Tracy
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Raymond Camden
Sent: Thursday, October 20, 2005 5:51 PM
To: [email protected]
Subject: [flexcoders] Odd error with send()
I'm using this syntax to call a WS:
var params = new Object();
params.specification = new Object();
params.specification.PanDirection = "None";
params.specification.ZoomLevel = currentZoom;
params.specification.Carriers =
activeCarrierNames;
params.specification.StartingZipCode =
currentZip;
params.specification.Dimensions = new Object();
params.specification.Dimensions.Width = 600;
params.specification.Dimensions.Height = 502;
xxxxxx.GetMaps.send(params);
The web service has a fault method that I use to log errors. The fault
method is fired and the msg I get is:
-1 Arguments not allowed in send()
First off - since the message comes from the fault method, this means
the message comes from the remote system, right? But it seems like
Flex is complaining since it mentions send.
FYI, I was using the <mx:operation> tag, but I needed my Flex app to
call the same method with 2 different types of args. As far as I know,
that means I _cant_ use this format anymore:
<mx:operation name="GetMaps" fault="showFault(event.fault)"
result="spResult(event.result)">
<mx:request>
<specification>
<PanDirection>{currentPan}</PanDirection>
<ZoomLevel>{currentZoom}</ZoomLevel>
<Carriers><array>{activeCarrierNames}</array></Carriers>
<StartingZipCode>{currentZip}</StartingZipCode>
<Dimensions><Width>600</Width><Height>502</Height></Dimensions>
</specification>
</mx:request>
</mx:operation>
This worked fine btw. I assumed my script version above was a one to
one remapping of it. (Just noticed that PanDirection was hard coded,
but changing that didn't help.)
--
=======================================================================
Raymond Camden, Director of Development for Mindseye, Inc
(www.mindseye.com)
Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia)
Email : [EMAIL PROTECTED]
Blog : ray.camdenfamily.com
Yahoo IM : cfjedimaster
"My ally is the Force, and a powerful ally it is." - Yoda
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
------------------------ Yahoo! Groups Sponsor --------------------~-->
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/nhFolB/TM
--------------------------------------------------------------------~->
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
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/