Uploaded image for project: 'Axis2'
  1. Axis2
  2. AXIS2-4818

Inheritance on method parameters not working

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 1.4
    • None
    • None
    • None
    • Ubuntu Jaunty 9.04, JDK 1.6u21, Tomcat 6.0

    Description

      I have a test web service with following methods & classes,

      Method
      ------------
      public String addPerson(Person p) {
      if(p instanceof Employee) {
      return "Employee";
      }
      return "Person";
      }
      Note: Method is annotated with @WebMethod, @WebParam annotations, so is web service with @WebService.

      Classes
      -------------

      Class Person {
      private String name;

      // getters and setters
      }

      Class Employee extends Person{
      private int employeeNo;

      // getters and setters
      }

      Observations
      -------------------
      In spite of client sending the serialized Employee object the web service is always taking it as a Person object. I have checked the soap packet on client with firebug tool, employee number is present in the payload. I also checked soap MESSAGE on server & there I dont see employee number attribute.

      Attachments

        Issue Links

          Activity

            People

              amilachinthaka Amila Chinthaka Suriarachchi
              chetansaundankar Chetan Saundankar
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: