3 Replies Latest reply on Oct 4, 2007 6:26 AM by mrokka123

    JBossWS 2.0.1 Inheritance problem

    mrokka123

      I have tried @XmlSeeAlso on jbossWS2.0.1 to solved the type substitution problem[inheritance problem]. But it does not solved my problem. I have the following situation:

      My Pojo classes

      @XmlSeeAlso({B.class,C.class})
      public class A extends java.io.Serializable{
      }

      public class B extends A{
      }

      public class C extends A{
      }

      Now webservice
      @WebService(name = "MyWebServicePortType", serviceName = "MyWebService",
      portName = "MyWebServicePort",targetNamespace = "http://mywebservice.com")

      @SOAPBinding(style = SOAPBinding.Style.DOCUMENT,
      use = SOAPBinding.Use.LITERAL,
      parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
      public class MyWebService{
      @WebMethod
      public String getClassName(A obj){
      String className=obj.getClass().getName();
      return className; //it always returns ?A? on jbossWS2.0.1 even if I pass the reference of B while calling this function from client
      }
      }

      Does anybody knows the solution?