• 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, Resource.java, 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.

With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!