public DispatcherResult killDispatcherExecution(final String execId) throws CentralDispatcherException { final HashMap<String, String> params = new HashMap<String, String>(); params.put("id", execId); params.put("xmlreq", "true"); // 2. send request via ServerService final WebserviceResponse response; try { response = serverService.makeRundeckRequest(RUNDECK_KILL_JOB_PATH, params, null, null); } catch (MalformedURLException e) { throw new CentralDispatcherServerRequestException("Failed to make request", e); } final Envelope envelope = validateResponse(response); final boolean result = envelope.isSuccessResult(); final StringBuffer sb = envelope.successMessages(); return new DispatcherResult() { public boolean isSuccessful() { return result; } public String getMessage() { return sb.toString(); } }; }