m.setAttachmentMarshaller(am);
am.cleanup();
m.marshal(jaxbObject,xsb.createFromXMLStreamWriter());
// any way to reuse this XMLStreamBuffer in StreamMessage?
return new StreamMessage(headers,attachments,xsb.readAsXMLStreamReader(),soapVersion);
} catch (JAXBException e) {
throw new WebServiceException(e);
} catch (XMLStreamException e) {
throw new WebServiceException(e);
}