private void processEntityEnclosingMethod() {
try {
Header contentType = request.getFirstHeader(HTTP.CONTENT_TYPE);
String contentTypeStr = contentType != null ?
contentType.getValue() : inferContentType();
String charSetEncoding = BuilderUtil.getCharSetEncoding(contentTypeStr);
msgContext.setProperty(
Constants.Configuration.CHARACTER_SET_ENCODING, charSetEncoding);
if (HTTPTransportUtils.isRESTRequest(contentTypeStr) || isRest(contentTypeStr)) {
RESTUtil.processPOSTRequest(msgContext, is, os,
request.getRequestLine().getUri(), contentTypeStr, isRestDispatching);
} else {
Header soapAction = request.getFirstHeader(SOAPACTION);
HTTPTransportUtils.processHTTPPostRequest(
msgContext, is,
os,
contentTypeStr,
(soapAction != null ? soapAction.getValue() : null),
request.getRequestLine().getUri());
}
} catch (Exception e) {
handleException("Error processing POST request ", e);
}
}