final ServletEndpointContext context = getContext();
endpointContext.set(new InvocationContext((HttpServletRequest) req));
try {
res.setContentType("text/xml");
final HttpRequest httpRequest = new ServletRequestAdapter((HttpServletRequest) req, (HttpServletResponse) res, config.getServletContext());
final HttpResponse httpResponse = new ServletResponseAdapter((HttpServletResponse) res);
if (pojo != null) {
req.setAttribute(WsConstants.POJO_INSTANCE, pojo);
}