[jboss-user] [JBossWS] - Casting porblem

pablinkus do-not-reply at jboss.com
Thu Mar 12 15:02:55 EDT 2009


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
 

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

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



More information about the jboss-user mailing list