Index: src/webapp/webservice/inc/GnuBoat/Service.php
===================================================================
--- src/webapp/webservice/inc/GnuBoat/Service.php	(revision 1ba85cfea8eecb5adf75472f5462f4c6cfd696cf)
+++ src/webapp/webservice/inc/GnuBoat/Service.php	(revision 89c510fdf91806e878ff9a0342d5b593186e23e3)
@@ -44,4 +44,15 @@
 		$this->process();
 	}
+	
+	public static function error($message)
+	{
+		Service::output(["error" => 1, "errormessage" => $message]);
+	}
+	
+	public static function output($content)
+	{
+		header('Content-Type: application/json');
+		echo json_encode($content);
+	}
 
 	/**
