[jboss-user] [JBossWS] - Passing subclasses as parameters

sagimann do-not-reply at jboss.com
Wed Oct 1 10:37:47 EDT 2008

I've encountered an issue while trying to declare web service methods which accept subclasses. The published WSDL does not contain the sub classes even if I specify them in @XmlSeeAlso. I've read some posts about this here, and it seems that it should be supported in JBossWS 2.0.2 and higher, but I tried 2.0.2 and 3.0.3 - still the same result.

My web service code:

  | import javax.jws.WebService;
  | import javax.jws.WebMethod;
  | import javax.jws.WebParam;
  | import javax.xml.bind.annotation.XmlSeeAlso;
  | @WebService
  | @XmlSeeAlso(SubBean.class)
  | public class Hello {
  |     @WebMethod public String testAbstractBeanArg(
  |             @WebParam AbstractBean bean) {
  |         return "abstract bean: " + bean.getClass().getName() + " " + bean.toString();
  |     }
  | }

Now, I look in the published WSDL, and I only see the abstractBean declaration - no subBean declaration. This does not happen with JAXWS RI 2.1 (Metro), which properly generates the "subBean" schema.

any ideas what should I do to see the subBean schema?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4179822#4179822

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4179822

More information about the jboss-user mailing list