Subversion Repositories eFlore/Applications.del

Rev

Rev 1690 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1690 Rev 1697
Line 376... Line 376...
376
			$clientRest = $this->conteneur->getRestClient();
376
			$clientRest = $this->conteneur->getRestClient();
377
			$urlTpl = $this->conteneur->getParametre('urlServiceCelObs');
377
			$urlTpl = $this->conteneur->getParametre('urlServiceCelObs');
378
			$url = $urlTpl.$idObs;
378
			$url = $urlTpl.$idObs;
379
			$retourCel = $clientRest->modifier($url, $parametres);
379
			$retourCel = $clientRest->modifier($url, $parametres);
380
			$retour = preg_match('/^OK$/i', $retourCel) ? 'OK' : false;
380
			$retour = preg_match('/^OK$/i', $retourCel) ? 'OK' : false;
-
 
381
			if ($retour === false) {
-
 
382
				$message = "Erreur du web service CEL : ".$retourCel;
-
 
383
				$code = RestServeur::HTTP_CODE_MAUVAISE_REQUETE;
-
 
384
				throw new Exception($message, $code);
-
 
385
			}
-
 
386
		} else {
-
 
387
			$message = "Ce web service doit contenir un paramètre 'transmission'.";
-
 
388
			$code = RestServeur::HTTP_CODE_MAUVAISE_REQUETE;
-
 
389
			throw new Exception($message, $code);
381
		}
390
		}
382
		return $retour;
391
		return $retour;
383
	}
392
	}
384
}
393
}
385
394