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 008bce99c15e3dad6fcf395f8c3a3f69b23b4b28)
@@ -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);
+	}
 
 	/**
