Set attachmentNames = normalizedMessage.getAttachmentNames();
Collection<Attachment> attachmentList = new ArrayList<Attachment>();
for (Iterator it = attachmentNames.iterator(); it.hasNext();) {
String id = (String) it.next();
DataHandler handler = normalizedMessage.getAttachment(id);
Attachment attachment = new AttachmentImpl(id, handler);
attachmentList.add(attachment);
}
message.setAttachments(attachmentList);
message.put(Message.CONTENT_TYPE, "application/soap+xml");
}