Using JAXB Java 1.6.0_23, I get the following XML file for the TestMessage instance:
TestMessage testMessage = new TestMessage(); testMessage.id = 1; testMessage.myid = 2l; testMessage.msg = "Test12345678".getBytes(); <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <testMessage id="1"> <myid>2</myid> <msg>VGVzdDEyMzQ1Njc4</msg> </testMessage>
If you unmount this xml content, you must return an instance of TestMessage, including the msg byte array (which is encoded base64 in the XML file).
source share