	protected void doGet(HttpServletRequest httpRequest, HttpServletResponse response) throws IOException {
		log.debug("Handling Get request: " + httpRequest.getRequestURI());
		try {
			Map<String, String> params = initSession(httpRequest);
			if (params.get("service") != null && params.get("service").equals("wps")) {
				String version = params.get("version");
				if (version != null && !version.equals("1.0.0")) {
					throw new WpsException(
							"Only WPS version 1.0.0 is supported.",
							WpsErrorCode.VersionNegotiationFailed, null, null);
				}
				String request = params.get("request");
				if (request == null) {
					throw new WpsException(
							"Parameter request is missing.",
							WpsErrorCode.MissingParameterValue, null, "request");
				}
				else if (request.toLowerCase().equals("getcapabilities")) {
					getCapabilities(httpRequest, response);
				}
				else if (request.toLowerCase().equals("describeprocess")) {
					describeProcess(response);
				}
				else if (httpRequest.getMethod().toLowerCase().equals("post") && 
							request.toLowerCase().contains("execute")) {
					execute(params, response, httpRequest);
				}
				else {
					throw new WpsException(
							"Parameter request is invalid: " + request,
							WpsErrorCode.InvalidParameterValue, null, "request");
				}
			} else {
				throw new WpsException(
						"Parameter service is missing.",
						WpsErrorCode.MissingParameterValue, null, "service");
			}
		} catch (WpsException e) {
			WpsUtil.printError(e, null, response);
		}
	}

	protected void doGet(HttpServletRequest httpRequest, HttpServletResponse response) throws IOException {
		log.debug("Handling Get request: " + httpRequest.getRequestURI());
		try {
			Map<String, String> params = initSession(httpRequest);
			if (params.get("service") != null && params.get("service").equals("wps")) {
				String version = params.get("version");
				if (version != null && !version.equals("1.0.0")) {
					throw new WpsException(
							"Only WPS version 1.0.0 is supported.",
							WpsErrorCode.VersionNegotiationFailed, null, null);
				}
				String request = params.get("request");
				if (request == null) {
					throw new WpsException(
							"Parameter request is missing.",
							WpsErrorCode.MissingParameterValue, null, "request");
				}
				else if (request.toLowerCase().equals("getcapabilities")) {
					getCapabilities(httpRequest, response);
				}
				else if (request.toLowerCase().equals("describeprocess")) {
					describeProcess(response);
				}
				else if (request.toLowerCase().contains("execute")) {
					throw new WpsException(
							"Execute operation only supported with POST method." + request,
							WpsErrorCode.InvalidParameterValue, null, "request");
				}
				else {
					throw new WpsException(
							"Parameter request is invalid: " + request,
							WpsErrorCode.InvalidParameterValue, null, "request");
				}
			} else {
				throw new WpsException(
						"Parameter service is missing.",
						WpsErrorCode.MissingParameterValue, null, "service");
			}
		} catch (WpsException e) {
			WpsUtil.printError(e, null, response);
		}
	}
