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?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4087014#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...