Assuming you are using CXF 2.1.x (and not 2.0.x), the easiest thing to do is to add an @XmlSeeAlso(SpecialPerson.class) annotation to the interface. That allows the JAXB runtime to see the subclass so you'll get it properly written out (with the xsi:type) and can then be properly read as well.
Dan On Tuesday 16 September 2008 10:48:50 am Philipp Schill wrote: > Hello, > > i want to use cxf to provide a webservice with complex data types: > > @WebMethod(action = "lookupPerson") > List<Person> lookupPerson(@WebParam (name = "person") Person person) > throws InternalException, BackendException; > > Person is an Object with some Parameters. > Person has also a subclass SpecialPerson. > > How do I have to annotate the WebMethod to get a SpecialPerson back in case > it is a SpecialPerson. I always get a Person back. > > Are there any examples with complex data types and inheritance? > > Thanks and regards > philipp > > ________________________________ > The information contained in this communication is confidential, intended > solely for the use of the individual or entity to whom it is addressed and > may be legally privileged and protected by professional secrecy. Access to > this message by anyone else is unauthorized. If you are not the intended > recipient, any disclosure, copying, or distribution of the message, or any > action or omission taken by you in reliance on it is prohibited and may be > unlawful. Please immediately contact the sender if you have received this > message in error. This email does not constitute any commitment from Cordys > Holding BV or any of its subsidiaries except when expressly agreed in a > written agreement between the intended recipient and Cordys Holding BV or > its subsidiaries. Cordys is neither liable for the proper and complete > transmission of the information contained in this communication nor for any > delay in its receipt. Cordys does not guarantee that the integrity of this > communication has been maintained nor that the communication is free of > viruses, interceptions or interference. If you are not the intended > recipient of this communication please return the communication to the > sender and delete and destroy all copies. -- Daniel Kulp [EMAIL PROTECTED] http://www.dankulp.com/blog