}
public void service(HttpServletRequest req, HttpServletResponse res) {
WebServiceCallSpec spec = injector.getInstance(WebServiceCallSpec.class);
RequestSpec requestSpec = spec.getRequestSpec();
ResponseSpec responseSpec = spec.getResponseSpec();
GsonBuilder gsonBuilder = injector.getInstance(GsonBuilder.class);
RequestReceiver requestReceiver = new RequestReceiver(gsonBuilder, requestSpec);
WebServiceRequest webServiceRequest = requestReceiver.receive(req);
Gson gson = injector.getInstance(GsonBuilder.class)
.registerTypeAdapterFactory(new ResponseBodyGsonTypeAdapterFactory(responseSpec.getBodySpec()))
.create();
ResponseSender responseSender = new ResponseSender(gson);
WebServiceResponse response = buildResponse(responseSpec, webServiceRequest);
responseSender.send(res, response);
}