0 Replies Latest reply on Mar 12, 2009 3:02 PM by Pablo Gañán

    Casting porblem

    Pablo Gañán Newbie

      Hi,

      I'm quite new with web services, so perhaps it is a stupid question.

      I'm working with JBoss 4.2.2 and I've installed JBossws-native 3.0.5.
      I've created a simple web service with he method that receive and List of objects.

      Something like this:
      public long startTramitadorInstance(String processName, List < Product > productList)

      Product is a superclass and I've set in it the @XmlSeeAlso tag with the subclasses.

      I use the wscompile included in the jbossws-native package tool to generate classese from the WSDL. And if I call this method from a client and the List is formed for several subclasses of the superclass, I always get an Exception:
      Caused by: java.lang.ClassCastException: com..beans.product.Product cannot be cast to com..beans.product.Subproduct

      Is that normal? Cann't I use superclasses or abstract classes in the methods of the web service? Am I doing something wrong?

      Thanks in advance
      Pablo