It seems like JAXB Provider in Jersey only registers one class of the
returned type only for marshalling/unmarshalling data. Therefore, it cannot
handle cases like this properly
1. public A getA()
where A is the base class and has B and C inherited from it. If getA()
returns instance of B or C, only contents in A are marshalled.
2. public A[] getAllA()
where A is the base class and has B and C inherited from it. If getA()
returns instance of B or C, only contents in A are marshalled.
3 public A getA()
where A refers to some other classes like
@XmlRootElement("A")
public class A {
public B b;
}
@XmlRootElement("B")
{
public int propB;
}
Instead of getting marshalled to
<propB>1</propB>
but it seems to be marshalled as
<propB>1</propB>
--
View this message in context: http://n2.nabble.com/Jersey-register-only-one-class-to-JAXB-marshaller-at-a-time-tp3179530p3179530.html
Sent from the Jersey mailing list archive at Nabble.com.