Hi

I have tried with the passing the argument as string it works but 
when we send the array or custom object it fails

Example:

var gatewayUrl : String = "http://localhost:8080/demoApp/gateway";
                  var gateway_conn:NetConnection = new
NetConnection();
                 
                  gateway_conn.objectEncoding =
flash.net.ObjectEncoding.DEFAULT
                  gateway_conn.connect( gatewayUrl );
                 
                  /* This call works prefect */
                  gateway_conn.call
("com.tis.demoApp.dao.SampleDAO.validateUser", new
flash.net.Responder(onResult,
onFault),loginVO.loginName,loginVO.password);

/* This call fail */

var userList:Array = new Array();
userList.push("12");
userList.push("12");

                  gateway_conn.call
("com.tis.demoApp.dao.SampleDAO.updateEmployeeList", new
flash.net.Responder(onResult, onFault),userList);


/* This call fail */

                  gateway_conn.call
("com.tis.demoApp.dao.SampleDAO.demoValueObjectList", new
flash.net.Responder(onResult, onFault),loginVO);


Server Side API
public void validateUser(String userId, String password)
public ArrayList updateEmployeeList(ArrayList dataList)
public void demoValueObjectList(LoginVO loginVo)


LoginVO  as sample Replica Object as Flex with
[RemoteClass(alias="com.tis.demoApp.value.LoginVO")]
      public class LoginVO {
           
            public var loginId:String;
            public var loginName:String
            public var userTokenId:String
            public var password:String
                       
            public function LoginVO(){
                  //
            }
           
      }

Server Side Object

package com.tis.demoApp.value;

public class LoginVO {

    private String loginId;
    private String loginName;
    private String userTokenId;
      private String password;

    public LoginVO() {

    }

    public LoginVO(String loginId, String loginName,String
userTokenId,String password) {
        this.loginId = loginId;
        this.loginName = loginName;
        this.userTokenId = userTokenId;
            this.password = password;
    }

    public String getId() {
        return loginId;
    }

      public void setId(String loginId) {
        this.loginId = loginId;
    }

    public String getName() {
        return loginName;
    }

    public void setName(String loginName) {
        this.loginName = loginName;
    }
}

is that bug in flex 2.0 beta 2 , need help


--- In flexcoders@yahoogroups.com, "Peter Farland" <[EMAIL PROTECTED]>
wrote:
>
> 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




YAHOO! GROUPS LINKS




Reply via email to