* @throws IOException If anything goes wrong reading or writing.
*/
protected void doResponse(Reader requestReader, HttpServletRequest request,
HttpServletResponse response, int req_type)
throws ServletException, IOException {
AbstractService dispatched;
LOGGER.info("req_type is " + req_type);
switch (req_type) {
case GET_CAPABILITIES_REQUEST:
dispatched = new Capabilities();
break;
case DESCRIBE_FEATURE_TYPE_REQUEST:
dispatched = new Describe();
break;
case GET_FEATURE_REQUEST:
dispatched = new Feature();
break;
case TRANSACTION_REQUEST:
dispatched = new Transaction();
break;
case GET_FEATURE_LOCK_REQUEST:
dispatched = new FeatureWithLock();
break;
case LOCK_REQUEST:
dispatched = new Lock();
break;
default:
dispatched = null;
}
if ((dispatched != null)) {
dispatched.init(servletConfig); //only really needed for init
if (requestReader == null) {
dispatched.doGet(request, response);
} else {
dispatched.doPost(request, response, requestReader);
}
} else {
String message;
if (requestReader == null) {