{
HttpRequest request = requestWrapper.getHttpRequest();
dispatcher.pushContextObjects(request, response);
try
{
ServerResponse jaxrsResponse = null;
try
{
jaxrsResponse = (ServerResponse) requestWrapper.getInvoker().invoke(request, response);
}
catch (Exception e)
{
dispatcher.handleInvokerException(request, response, e);
}
if (jaxrsResponse == null)
return null;
try
{
Object entity = jaxrsResponse.getEntity();
if (entity instanceof ModelAndView)
{
jaxrsResponse.commitHeaders(response);
return (ModelAndView) entity;
}
return createModelAndView(jaxrsResponse);
}
catch (Exception e)