且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

JAXB 外部自定义绑定 XJC 问题 - 解析结果为空节点

更新时间:2023-09-28 22:49:28

您将需要包装在具有架构位置集的绑定中.它应该是这样的:

You will need to wrap in a bindings that has the schema location set. It should be something like:

<jxb:bindings 
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
    xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
    xmlns:pd="http://chubb.com/cpi/polsvc/xmlobj"
    xmlns:inheritance="http://jaxb2-commons.dev.java.net/basic/inheritance"
    jxb:extensionBindingPrefixes="inheritance"
    version="2.1">
    <jxb:bindings schemaLocation="your-schema.xsd">
        <jxb:bindings node="//xs:complexType[@name='AddBankVaultRplyType']">
            <inheritance:extends>com.print.poc.AddressTypeHelper</inheritance:extends>
        </jxb:bindings>
    </jxb:bindings>
</jxb:bindings>

更多信息: