0 Replies Latest reply on Oct 1, 2008 10:37 AM by sagimann

    Passing subclasses as parameters

    sagimann

      Hi,
      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?
      thanks.