Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JAXB unmarshalls to the base class  RSS feed

Muthukrishnan Manoharan
Ranch Hand
Posts: 91
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using Jersey to expose my REST webservices.

I have the following classes

Definition of Child1

Now in definition of my service,, I have the following service defined

So for the above service, if I invoke with child XML, for example

It does not convert to the proper sub class (Child1, in this case). It is still BaseClass and my System.out.println() prints "BaseClass". I want it to get the proper sub class.

Please let me know if I am not clear with my question.

Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!