InputStream inStream = getTestResource(inFileName);
Attachments attachments = new Attachments(inStream, contentTypeString);
XMLStreamReader reader = XMLInputFactory.newInstance()
.createXMLStreamReader(new BufferedReader(new InputStreamReader(attachments
.getSOAPPartInputStream())));
OMXMLParserWrapper builder = new MTOMStAXSOAPModelBuilder(reader, attachments,
SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
OMElement root = builder.getDocumentElement();
// Build tree
root.build();
// Use tree as input to XMLStreamReader