* JAXBMessage writes envelope directly to the OutputStream(for SJSXP, woodstox).
* While writing, it calls the AttachmentMarshaller methods for adding attachments.
* JAXB writes xop:Include in this case.
*/
public AttachmentMarshaller getAttachmentMarshaller() {
return new AttachmentMarshaller() {
public String addMtomAttachment(DataHandler data, String elementNamespace, String elementLocalName) {
// Should we do the threshold processing on DataHandler ? But that would be
// expensive as DataHolder need to read the data again from its source
ByteArrayBuffer bab = new ByteArrayBuffer(data);