| JAX-WS and type substitution [message #990642] |
Thu, 13 December 2012 09:56  |
Daniel Mühlemann Messages: 2 Registered: December 2012 |
Junior Member |
|
|
Dear all
I generated a WebService consumer from WSDL in Scout. The WebMethod I call returns a list of "Vehicle"-objects. When I iterate over the result list and try to cast its elements to the subclass "Car" I get a ClassCastException. I can't even check the type with instanceof.
I could solve the problem in adding the annotation @XmlSeeAlso({Car.class}) to the generated WebService Stub. Unfortunately I lose my changes when I rebuild the WebService Stub.
Is it possible to handle this type substitution automatically?
Best Regards
Daniel
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.01493 seconds