diff --git a/phpgwapi/inc/class.soap_server.inc.php b/phpgwapi/inc/class.soap_server.inc.php
index c557eac990..badabeff8c 100644
--- a/phpgwapi/inc/class.soap_server.inc.php
+++ b/phpgwapi/inc/class.soap_server.inc.php
@@ -29,7 +29,7 @@
function service($data)
{
// $response is a soap_msg object
- $response = $this->parseRequest($data);
+ $response = get_class($data) == 'soapmsg' ? $date : $this->parseRequest($data);
$this->debug("parsed request and got an object of this class '".get_class($response)."'");
$this->debug("server sending...");
// pass along the debug string
diff --git a/soap.php b/soap.php
index 34f303fc93..c13c21c1ad 100644
--- a/soap.php
+++ b/soap.php
@@ -25,6 +25,13 @@
/* _debug_array($GLOBALS['server']);exit; */
/* include(EGW_API_INC . '/soaplib.soapinterop.php'); */
+ if (!$GLOBALS['egw_info']['server']['soap_enabled'])
+ {
+ $GLOBALS['server']->make_fault(9999,'soap service is not enabled in the eGroupWare system configuration');
+ $GLOBALS['server']->service($GLOBALS['server']->fault());
+ exit;
+ }
+
/* Note: this command only available under Apache */
$headers = getallheaders();
diff --git a/xmlrpc.php b/xmlrpc.php
index 527abbc895..ab045f6f80 100644
--- a/xmlrpc.php
+++ b/xmlrpc.php
@@ -30,6 +30,12 @@
/* uncomment here if you want to show all of the testing functions for compatibility */
//include(EGW_API_INC . '/xmlrpc.interop.php');
+
+ if (!$GLOBALS['egw_info']['server']['xmlrpc_enabled'])
+ {
+ $server->xmlrpc_error(9999,'xmlrpc service is not enabled in the eGroupWare system configuration');
+ exit;
+ }
/* Note: this command only available under Apache */
$headers = getallheaders();