} else if (msgContext.isDoingREST()) {
XMLStreamReader xmlreader =
XMLInputFactory.newInstance().createXMLStreamReader(inStream, charSetEnc);
SOAPFactory soapFactory = new SOAP11Factory();
builder = new StAXOMBuilder(xmlreader);
builder.setOmbuilderFactory(soapFactory);
envelope = soapFactory.getDefaultEnvelope();
envelope.getBody().addChild(builder.getDocumentElement());
// We now have the message inside an envolope. However, this is