I am sorry but I have a basic question. (i am new to the protocol).

My class Person:
public class Person implements Serializable{
        private String name;
        private int age;
 
        public int getAge() {
                return age;
        }
        public void setAge(int age) {
                this.age = age;
        }
        public String getName() {
                return name;
        }
        public void setName(String name) {
                this.name = name;
        }
}

Then I have implemented the service with this method signature:
public int sayHi(Person person) ;

But I have problems passing the person.
Is the same method to call can be used?
as:

String url = "http://localhost/HessianService/MyService";;

            HessianProxyFactory factory = new HessianProxyFactory();

            MyService my = (MathService) factory.create(MyService.class, 
url);
 
            Person aPerson = new Person(); 
        aPerson.setAge(20);
        aPerson.setName("aName");
 
           my.sayHi(aPerson);

The proxy my, does not recognize the method.

Is this the correct way to send a custome object to the service?

Thanks for your help.

Gabriel

*************************** IMPORTANT
NOTE***************************** The opinions expressed in this
message and/or any attachments are those of the author and not
necessarily those of Brown Brothers Harriman & Co., its
subsidiaries and affiliates ("BBH"). There is no guarantee that
this message is either private or confidential, and it may have
been altered by unauthorized sources without your or our knowledge.
Nothing in the message is capable or intended to create any legally
binding obligations on either party and it is not intended to
provide legal advice. BBH accepts no responsibility for loss or
damage from its use, including damage from virus.
************************************************************************
_______________________________________________
hessian-interest mailing list
[email protected]
http://maillist.caucho.com/mailman/listinfo/hessian-interest

Reply via email to