} else if (msgContext.isDoingREST() && !JavaUtils.isTrueExplicitly(
msgContext.getProperty(Constants.Configuration.SOAP_RESPONSE_MEP))) {
type = HTTPConstants.MEDIA_TYPE_APPLICATION_XML;
}
}
Builder builder = BuilderUtil.getBuilderFromSelector(type, msgContext);
if (builder != null) {
documentElement = builder.processDocument(inStream, contentType, msgContext);
}
}
if (documentElement == null) {
if (msgContext.isDoingREST()) {
StAXBuilder builder = BuilderUtil.getPOXBuilder(inStream, charsetEncoding);
documentElement = builder.getDocumentElement();
} else {
// FIXME making soap defualt for the moment..might effect the
// performance
String charSetEnc = (String) msgContext
.getProperty(Constants.Configuration.CHARACTER_SET_ENCODING);
StAXBuilder builder = BuilderUtil.getSOAPBuilder(inStream, charSetEnc);
documentElement = builder.getDocumentElement();
charsetEncoding = builder.getDocument().getCharsetEncoding();
}
}
SOAPEnvelope envelope;
// Check whether we have received a SOAPEnvelope or not