// even if the attachment is SWAREF ?)
if (isSWA) {
if (log.isDebugEnabled()){
log.debug("adding DataHandler for SWA");
}
textNode = new OMTextImpl(dh, null);
// If old SWA attachments, get the ID and add the attachment to message
cid = textNode.getContentID();
addDataHandler(dh, cid);
} else {
if (log.isDebugEnabled()){
log.debug("adding DataHandler for MTOM");
}
if (writer instanceof MTOMXMLStreamWriter) {
textNode = new OMTextImpl(dh, null);
if(((MTOMXMLStreamWriter) writer).isOptimizedThreshold(textNode)){
if (log.isDebugEnabled()){
log.debug("The MTOM attachment is written as an attachment part.");
}
cid = textNode.getContentID();