MTOM attach document

AttachmentType at = new AttachmentType();

Base64Binary b64 = new Base64Binary();

// DataHandler dh = new DataHandler(new FileDataSource("C:\\dev\\books\\cm\\8.3\\CMV8.3 Resource Manager tables.pdf"));

DataHandler dh = new DataHandler(new FileDataSource("C:\\dev\\data\\demo.tiff"));


b64.setBase64Binary(dh);

at.setBinaryData(b64);