protected void processRequest(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
try {
XmlRpcServer xmlrpc = new XmlRpcServer();
ApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(getServletContext());
BloggerAPIHandler bloggerApi = (BloggerAPIHandler)ctx.getBean("bloggerApiHandler");
xmlrpc.addHandler("blogger", bloggerApi);
MetaWeblogAPIHandler metaweblogApi = (MetaWeblogAPIHandler)ctx.getBean("metaweblogApiHandler");
xmlrpc.addHandler("metaWeblog", metaweblogApi);
PebbleAPIHandler pebbleApi = (PebbleAPIHandler)ctx.getBean("pebbleApiHandler");
xmlrpc.addHandler("pebble", pebbleApi);
SearchAPIHandler searchApi = (SearchAPIHandler)ctx.getBean("searchApiHandler");
xmlrpc.addHandler("search", searchApi);
byte[] result = xmlrpc.execute(request.getInputStream());
response.setContentType("text/xml; charset=UTF-8");
response.setContentLength(result.length);
OutputStream out = response.getOutputStream();
out.write(result);
out.flush();