Customising JAXB bindings for marshling/unmarshling
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.
精彩评论