//-- credentials are not empty if (isset($_POST['login']) && $_POST['login'] != '' && isset($_POST['password']) && $_POST['password'] != '') { //-- file is not in error if (isset($_FILES['inputFile']['error']) && $_FILES['inputFile']['error'] == '0') { //-- file is a zip if (isset($_FILES['inputFile']['type']) && $_FILES['inputFile']['type'] == 'application/zip') { //-- loas class nusoap.php require_once '/var/www/appli/lib/nusoap.php'; //-- url webservice $url = 'http://connect.stage.exaprint.fr/?wsdl'; //-- load client nusoap $client = new soapclient($url); //-- load credentials (customers of front) $credentials = array('username' => str_replace("'", "''", $_POST['login']), 'password' => str_replace("'", "''", $_POST['password'])); //-- call WS to create Token $token = $client->__soapCall('getToken', array($credentials)); //-- if issues with the creation of token if (isset($token->error->code) && $token->error->code != '') { //-- generate error message switch ($token->error->code) { case '0': $error = 'Internal error'; break; case '-1': $error = 'Access denied'; break; default: $error = 'unknow error'; break; } //-- print error
$log->Calificacion = $result->Resultado->Calificacion; $log->URLVerResultados = $result->Resultado->URLVerResultados; add_to_log(3, 12, serialize(addslashes_object($log))); /// save log registering the number of details add_to_log(3, 13, serialize(count($result->Detalles))); $params = new ResultadoDetalleExtendido(); $params->ResultadoExtendido = new SoapVar($result, SOAP_ENC_OBJECT, "SeguimientoExtendido", "http://educacio.gencat.cat/agora/seguimiento/"); $client = new soapclient($reg_session->wsurltracking . '?wsdl', array('trace' => 1)); $auth = array('User' => $reg_credential->username, 'Password' => $reg_credential->password); $namespace = rcommond_wdsl_parser($reg_session->wsurltracking . '?wsdl'); $header = new SoapHeader($namespace, "WSEAuthenticateHeader", $auth); $client->__setSoapHeaders(array($header)); /// save log registering the call to ws tracking add_to_log(3, 14); try { $response = $client->__soapCall("ResultadoDetalleExtendido", array($params)); } catch (Exception $e) { print_r($e); } //delete session information if ($response->ResultadoDetalleExtendidoResult->Resultado == 'OK') { // XTEC *********** DELETED -> Take out the session delletion to keep it in hierarchical books // 2011.09.02 @mmartinez //delete_records("sessions", 'token', $token); // ********** FI echo "OK"; } else { $descError = "WS response error: " . $response->ResultadoDetalleExtendidoResult->DetalleError->Codigo . " - " . $response->ResultadoDetalleExtendidoResult->DetalleError->Descripcion; //have to add it to idiomatic files echo $descError; add_to_log(3, '3-1', serialize($descError), true);
//-- credentials are not empty if (isset($_POST['login']) && $_POST['login'] != '' && isset($_POST['password']) && $_POST['password'] != '') { //-- orderId is not empty if (isset($_POST['orderId']) && $_POST['orderId'] != '') { //-- reason is not empty if (isset($_POST['reasonId']) && $_POST['reasonId'] > '0') { //-- loas class nusoap.php require_once '/var/www/appli/lib/nusoap.php'; //-- url webservice $url = 'http://connect.stage.exaprint.fr/?wsdl'; //-- load client nusoap $client = new soapclient($url); //-- load credentials (customers of front) $credentials = array('username' => str_replace("'", "''", $_POST['login']), 'password' => str_replace("'", "''", $_POST['password'])); //-- get Token $token = $client->__soapCall('getToken', array($credentials)); //-- if issues with the creation of token if (isset($token->error->code) && $token->error->code != '') { //-- generate error message switch ($token->error->code) { case '0': $error = 'Internal error'; break; case '-1': $error = 'Access denied'; break; default: $error = 'unknow error'; break; } //-- print error
* */ $time_start = microtime(true); //-- credentials are not empty if (isset($_POST['login']) && $_POST['login'] != '' && isset($_POST['password']) && $_POST['password'] != '') { if (isset($_POST['orderId']) && $_POST['orderId'] != '') { //-- loas class nusoap.php require_once '/var/www/appli/lib/nusoap.php'; //-- url webservice $url = 'http://connect.stage.exaprint.fr/?wsdl'; //-- load client nusoap $client = new soapclient($url); //-- load credentials (customers of front) $credentials = array('username' => str_replace("'", "''", $_POST['login']), 'password' => str_replace("'", "''", $_POST['password'])); //-- get Token $token = $client->__soapCall('getToken', array($credentials)); //-- if issues with the creation of token if (isset($token->error->code) && $token->error->code != '') { //-- generate error message switch ($token->error->code) { case '0': $error = 'Internal error'; break; case '-1': $error = 'Access denied'; break; default: $error = 'unknow error'; break; } //-- print error