write(obj, null, output);
}
public void write(Object obj, MessagePartInfo part, Message output) {
// if the mtom is enabled, we need to create the attachment mashaller
JAXBAttachmentMarshaller am = null;
if (Boolean.TRUE.equals(output.getContextualProperty(Message.MTOM_ENABLED))) {
am = new JAXBAttachmentMarshaller(output);
am.setXOPPackage(true);
}
Object source = null;
XMLStreamWriter xsw = (XMLStreamWriter)output.getContent(XMLStreamWriter.class);
if (xsw != null) {
source = xsw;