$inputs = explode("/", $url); $module = $inputs[0]; $service = isset($inputs[1]) ? $inputs[1] : $_REQUEST['service']; if (isset($inputs[2]) && !preg_match("/^\\?.*/si", $inputs[2])) { //http://local.openbiz.me/ws.php/oauth/callback/login/?type=qzone $_REQUEST['method'] = $inputs[2]; } if (count($inputs) >= 3) { for ($i = 3; $i < count($inputs); $i++) { $param = $inputs[$i]; if ($param) { preg_match("/^(.*?)_(.*)\$/s", $param, $match); $key = $match[1]; $value = $match[2]; $_REQUEST[$key] = $value; } } } ErrorHandler::$errorMode = 'text'; if ($module && $service) { if (!preg_match("/Service\$/s", $service)) { $service .= "Service"; } $websvc = $module . ".websvc." . $service; // get service object $svcObj = Openbiz::getObject($websvc); // invoke the method $svcObj->invoke(); } else { echo "Openbiz Webservice Ready!"; }
/** * Handle the exception from DataObj method, * report the error as an alert window * * @param int $errCode * @return string */ public function processDataException($e) { $errorMsg = $e->getMessage(); Openbiz::$app->getLog()->log(LOG_ERR, "DATAOBJ", "DataObj error = " . $errorMsg); //Openbiz::$app->getClientProxy()->showClientAlert($errorMsg); //showErrorMessage($errorMsg); //Openbiz::$app->getClientProxy()->showErrorMessage($errorMsg); $e->no_exit = true; ErrorHandler::exceptionHandler($e); }