JAXB xsi:type subclass unmarshalling not working

前端 未结 1 777

I\'m following the instructions on using xsi:type from this oft-cited blog post:

http://blog.bdoughan.com/2010/11/jaxb-and-inheritance-using-xsitype.html

Bas

相关标签:
1条回答
  • 2020-12-19 18:10

    In your test case you need to specify that the DocumentBuilderFactory is namespace aware. Without this setting the DOM input to your JAXB implemenation won't contain a properly formed xsi:type attribute.

        documentBuilderFactory.setNamespaceAware(true);
    
    0 讨论(0)
提交回复
热议问题