AttachmentSerializer serializer =
new AttachmentSerializer(message, getMultipartType(), getRootHeaders());
serializer.setXop(mtomEnabled);
try {
serializer.writeProlog();
} catch (IOException e) {
throw new Fault(new org.apache.cxf.common.i18n.Message("WRITE_ATTACHMENTS", BUNDLE), e);
}
message.setContent(AttachmentSerializer.class, serializer);