Printing binary as ‘hexBinary’ not ‘base64Binary’ with JAXB


    @XmlElement
    //@XmlSchemaType(name = "hexBinary") // seems not work
    @XmlJavaTypeAdapter(HexBinaryAdapter.class)
    private byte[] hex

    @XmlElement
    // :)
    private byte[] base64;
    <hex>45374A18354C8415D580D32E7EB987A6890A4EA370B0EE4109D86B70159B23</hex>
    <base64>RTdKGDVMhBXVgNMufrmHpokKTqNwsO5BCdhrcBWbIw==</base64>
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s