public String endTask(String taskNumber, String alfrescoTicket) {
        String line = "", response = "";
        //send cURL request
        try {
            String url = "http://phaedrus.scss.tcd.ie/CS3BC2/group6/tomcat/alfresco/service/api/workflow/task/end/" + taskNumber + "?alf_ticket=" + alfrescoTicket;

            URL obj = new URL(url);
            HttpURLConnection conn = (HttpURLConnection) obj.openConnection();
            conn.setRequestProperty("Content-Type", "application/json");
            conn.setDoOutput(true);
            conn.setRequestMethod("POST");

            String data = "{\"username\":\"admin\",\"password\":\"admin\"}";
            OutputStreamWriter out = new OutputStreamWriter(conn.getOutputStream());
            out.write(data);
            out.close();

            // Get the response
            BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
            while ((line = rd.readLine()) != null) {
                response = response + line;
            }
            rd.close();
        } catch (IOException e) {
        }

        return response;
    }