try {
rootPartOutputStream = multipartWriter.writeRootPart();
} catch (IOException ex) {
throw new XMLStreamException(ex);
}
ContentIDGenerator contentIDGenerator = new ContentIDGenerator() {
public String generateContentID(String existingContentID) {
return existingContentID != null ? existingContentID : getNextContentId();
}
};
xmlWriter = new XOPEncodingStreamWriter(StAXUtils.createXMLStreamWriter(