xml - JAXB XmlSeeAlso tag not working spring ws -
i consuming web service third party vendor, running strange issue.. jaxb unmarshaller trying instantiate abstract class (aparent) instead of subclass class child2
abstract parent class
@xmlaccessortype(xmlaccesstype.field) @xmltype(name = "aparent") @xmlseealso({ child1.class }) public abstract class aparent extends anotherparent { @xmlattribute(name = "atoken") protected string atoken; .... }
abstract child 1 class
@xmlaccessortype(xmlaccesstype.field) @xmltype(name = "child1") @xmlseealso({ child2.class }) public abstract class child1 extends aparent { .... get/set }
concrete - child 2 class
@xmlaccessortype(xmlaccesstype.field) @xmltype(name = "child2") public class child2 extends child1 { .... get/set }
org.springframework.oxm.unmarshallingfailureexception: jaxb unmarshalling exception; nested exception javax.xml.bind.unmarshalexception: unable create instance of child2.class
everything looks fine me, not sure why it's not working
Comments
Post a Comment