Esempio n. 1
0
$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;
        }
    }
}
OB_ErrorHandler::$errorMode = 'text';
if ($module && $service) {
    if (!preg_match("/Service\$/s", $service)) {
        $service .= "Service";
    }
    $websvc = $module . ".websvc." . $service;
    // get service object
    $svcObj = BizSystem::getObject($websvc);
    // invoke the method
    $svcObj->invoke();
} else {
    echo "Openbiz Webservice Ready!";
}
Esempio n. 2
0
 /**
  * Handle the exception from DataObj method,
  *  report the error as an alert window
  *
  * @param int $errCode
  * @return string
  */
 public function processBDOException($e)
 {
     $errorMsg = $e->getMessage();
     BizSystem::log(LOG_ERR, "DATAOBJ", "DataObj error = " . $errorMsg);
     //BizSystem::clientProxy()->showClientAlert($errorMsg);   //showErrorMessage($errorMsg);
     //BizSystem::clientProxy()->showErrorMessage($errorMsg);
     $e->no_exit = true;
     OB_ErrorHandler::ExceptionHandler($e);
 }
Esempio n. 3
0
/**
 * User exception handler function
 * @package openbiz.bin
 * @param <type> $exc
 */
function userExceptionHandler($exc)
{
    //include_once(OPENBIZ_BIN.'ErrorHandler.php');
    OB_ErrorHandler::ExceptionHandler($exc);
}