It depends on what the method signature for SampleDAO.getPersons looks
like. Where did you find this sample?

Note that the AS signature for NetConnection.call() is:

    public function call(command:String, responder:Responder, ...
arguments):void

So the ... syntax in AS means "the rest of the arguments" which is an
Array.

So, if the getPersons signature was something like this:

    public Person[] getPersons(List ids);

then the call would look like this:

    gateway_conn.call("com.tis.dao.SampleDAO.getPersons", responder,
userList);


Or, if the getPersons signature was like this:

    public Person[] getPersons(id1, id2, id3);

then the call would look like this:

    gateway_conn.call("com.tis.dao.SampleDAO.getPersons", responder,
"12", "13", "15");


-----Original Message-----
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of murtuza_ab
Sent: Thursday, April 20, 2006 10:55 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex Remoting

Hi,

Need help in the Remoting Implementation I have tried example of below,
with the method which does not take any param it works but what is the
syntax for passing the argument to the remote method.

We are using this example as we are not using flex data service server
side component. if any has related example with different way to achieve
also help

var gatewayUrl : String = "http://localhost:8080/demoApp/gateway";
                  gateway_conn = new NetConnection();
                  gateway_conn.objectEncoding =
flash.net.ObjectEncoding.AMF0;
                  gateway_conn.connect( gatewayUrl );
var userList:Array = new Array("12","13","15");
/*
                        what is the syntax for passing the
userList Array to the remote method
"com.tis.dao.SampleDAO.getPersons"
                  */


                  gateway_conn.call
("com.tis.dao.SampleDAO.getPersons", new flash.net.Responder(
onQueryResult, onQueryStatus ) );







--
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








--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to