envelope.buildWithAttachments();
} else {
XMLStreamReader xmlreader = StAXUtils.createXMLStreamReader(mis, charSetEnc);
builder = new StAXSOAPModelBuilder(xmlreader, namespaceURI);
envelope = (SOAPEnvelope) builder.getDocumentElement();
envelope.build();
}
} catch (Exception ex) {
// TODO: what to do if can't get the XML stream reader
// For now, log the event
log.error(correlationIDString