public String addMtomAttachment(byte[] data, int offset, int length, String mimeType, String elementNamespace, String elementLocalName) {
// inline the data based on the threshold
if (mtomFeature.getThreshold() > length) {
return null; // JAXB inlines the attachment data
}
ByteArrayBuffer bab = new ByteArrayBuffer(new DataHandler(new ByteArrayDataSource(data, offset, length, mimeType)));
mtomAttachments.add(bab);
return "cid:"+bab.contentId;
}
public String addSwaRefAttachment(DataHandler data) {