EnvelopeEditor editor,
SOAPContext ctx)
throws SOAPException, IOException,
IllegalArgumentException, MessagingException {
// Read input stream.
TransportMessage reqMsg = new TransportMessage(is, contentLength,
contentType, ctx,
null);
// Extract envelope and SOAPContext
reqMsg.read();
// Check Content-Type of root part of request to see if it's
// consistent with a SOAP envelope (text/xml).
MimeBodyPart rootPart = ctx.getRootPart();
if (!rootPart.isMimeType(Constants.HEADERVAL_CONTENT_TYPE))
throw new SOAPException(Constants.FAULT_CODE_PROTOCOL,
"Unsupported content type \"" +
rootPart.getContentType() + "\", must be: \"" +
Constants.HEADERVAL_CONTENT_TYPE + "\".");
// Apply Transport-Hook-Extension
reqMsg.editIncoming(editor);
// Parse into Envelope.
return reqMsg.unmarshall(xdb);
}