use of com.pogeyan.cmis.browser.shared.POSTHttpServletRequestWrapper in project copper-cms by PogeyanOSS.
the class AkkaCmisBrowserBindingServlet method gettingBaseMessage.
private BaseMessage gettingBaseMessage(String method, String[] pathFragments, IUserObject loginSession, HttpServletRequest request, HttpServletResponse response) {
BaseMessage bm = null;
try {
// check HTTP method
if (METHOD_GET.equals(method)) {
QueryStringHttpServletRequestWrapper qRequest = new QueryStringHttpServletRequestWrapper(request);
bm = ServletHelpers.queryHttpToBaseMessage((QueryStringHttpServletRequestWrapper) qRequest, pathFragments, loginSession);
} else if (METHOD_POST.equals(method)) {
POSTHttpServletRequestWrapper pRequest = new POSTHttpServletRequestWrapper(request);
bm = ServletHelpers.postToBaseMessage((POSTHttpServletRequestWrapper) pRequest, pathFragments, loginSession);
} else {
throw new CmisNotSupportedException("Unsupported method");
}
} catch (Exception e1) {
LOG.error("Service execution exception: {}, stack: {}", e1.getMessage(), ExceptionUtils.getStackTrace(e1));
ServletHelpers.printError(e1, request, response);
}
return bm;
}
Aggregations