开发者

Customising JAXB bindings for marshling/unmarshling

开发者 https://www.devze.com 2023-03-15 16:11 出处:网络
As per the pasted part from jaxb binding, I have an element name Amt, for which I want to invoke marshling/unmarshling. My question is when the below method will be called?

As per the pasted part from jaxb binding, I have an element name Amt, for which I want to invoke marshling/unmarshling. My question is when the below method will be called? Is it when any getter and setter methods are called.

<jxb:bindings node="//xs:complexType[@name='CreditTransferTransactionInformation1']"><jxb:bindings node=".//xs:element[@name='Amt']"> <jxb:property><jxb:baseType><jxb:javaType name="java.lang.String" parseMethod="com.anz.ssp.ibank.hostinterface.cim.jaxb.Dataty开发者_如何学编程peConverter.parseDoubleIFXFormat" printMethod="com.anz.ssp.ibank.hostinterface.cim.jaxb.DatatypeConverter.printDoubleIFXFormat"/>
                </jxb:baseType>
              </jxb:property>
            </jxb:bindings>
        </jxb:bindings>


For the Amt property you have used the bindings file to override how a JAXB implementation will handle that value. This will result in the generation of an XmlAdapter. The XmlAdapter will only be invoked during marshal/unmarshal operations are called, and not when get/set are called.

0

精彩评论

暂无评论...
验证码 换一张
取 消