OMElement omElement =
omFactory.createOMElement(ele.getQName().getLocalPart(), null);
omElement.addChild(
processComplexType(omElement, ele.getChildElements(), omFactory));
OutputStream partOutputStream = writer.writePart(DEFAULT_CONTENT_TYPE, null,
Collections.singletonList(new Header("Content-Disposition",
DISPOSITION_TYPE + "; name=\"" + omElement.getLocalName() + "\"")));
partOutputStream.write(omElement.toString().getBytes());
partOutputStream.close();
} else {
OutputStream partOutputStream = writer.writePart(DEFAULT_CONTENT_TYPE, null,
Collections.singletonList(new Header("Content-Disposition",
DISPOSITION_TYPE + "; name=\"" + ele.getLocalName() + "\"")));
partOutputStream.write(ele.getText().getBytes());
partOutputStream.close();
}
}