response.setResult(result);
SOAPAttachmentHandler attachmentHandler = new SOAPAttachmentHandler();
XMLMarshaller marshaller = dbwsAdapter.getXMLContext().createMarshaller();
marshaller.setAttachmentMarshaller(attachmentHandler);
marshaller.marshal(response, body);
if (attachmentHandler.hasAttachments()) {
// add attachments to message
for (String id : attachmentHandler.getAttachments().keySet()) {
DataHandler attachment = attachmentHandler.getAttachments().get(id);