* @throws IOException
*/
protected ServletCallBean preprocess(HttpServletRequest request) {
String serialize = request.getParameter(PARAM_SERIALIZE);
FieldValueWrapperMap reqparams = ContextKeeper.readRequestParams(request);
ServletCallBean bean = new ServletCallBean();
boolean isAjaxCall = "XMLHttpRequest".equals(request.getHeader("X-Requested-With"));
bean.setSerialization((ISerialization)null);
bean.setRequest(request);
bean.setCall(request.getRequestURL().toString());
bean.setChain(ServiceChain.decode(bean.getCall(), ConfigKeeper.getServiceUrl()));
bean.setParams(reqparams);
bean.setMethod(request.getMethod());
bean.getChain().setUser(request.getUserPrincipal());
bean.setRequest(request);
request.setAttribute("call", bean.getCall());
request.setAttribute("callBean", bean);
this.selectSerialization(bean, isAjaxCall, serialize);
return bean;