Renvoi vers page erreur si erreur soap

This commit is contained in:
Michael RICOIS 2011-08-19 13:00:53 +00:00
parent fb6854e244
commit 7ef478caaa
2 changed files with 11 additions and 1 deletions

View File

@ -46,6 +46,7 @@ class IdentiteController extends Zend_Controller_Action
if (empty($autrePage)) { if (empty($autrePage)) {
$ws = new WsScores(); $ws = new WsScores();
$infos = $ws->getIdentite($this->siret, $this->id); $infos = $ws->getIdentite($this->siret, $this->id);
if ($infos === false) $this->_forward('soap', 'error');
} else { } else {
$infos = $this->getRequest()->getParam('infos'); $infos = $this->getRequest()->getParam('infos');
} }
@ -166,6 +167,7 @@ class IdentiteController extends Zend_Controller_Action
//Récupération des informations //Récupération des informations
$ws = new WsScores(); $ws = new WsScores();
$infos = $ws->getIdentiteProcol($this->siret, $this->id); $infos = $ws->getIdentiteProcol($this->siret, $this->id);
if ($infos === false) $this->_forward('soap', 'error');
//Mise en session //Mise en session
$session = new SessionEntreprise($this->siret, $this->id); $session = new SessionEntreprise($this->siret, $this->id);
@ -275,6 +277,7 @@ class IdentiteController extends Zend_Controller_Action
$ws = new WsScores(); $ws = new WsScores();
$infos = $ws->getListeEtablissements($siren, $actif); $infos = $ws->getListeEtablissements($siren, $actif);
if ($infos === false) $this->_forward('soap', 'error');
$etabs = $infos->result->item; $etabs = $infos->result->item;

View File

@ -50,7 +50,8 @@ class JuridiqueController extends Zend_Controller_Action
Zend_Registry::get('firebug')->info('Filtre : '.$filtre); Zend_Registry::get('firebug')->info('Filtre : '.$filtre);
$ws = new WsScores(); $ws = new WsScores();
$infos = $ws->getAnnonces($siren, $filtre, $idAnn); $infos = $ws->getAnnonces($siren, $filtre, $idAnn);
if ($infos === false) $this->_forward('soap', 'error');
require_once 'Scores/Annonces.php'; require_once 'Scores/Annonces.php';
$objAnnonces = new Annonces($infos->result->item); $objAnnonces = new Annonces($infos->result->item);
@ -130,6 +131,8 @@ class JuridiqueController extends Zend_Controller_Action
$ws = new WsScores(); $ws = new WsScores();
$infos = $ws->getInfosReg($siren); $infos = $ws->getInfosReg($siren);
if ($infos === false) $this->_forward('soap', 'error');
Zend_Registry::get('firebug')->info($infos); Zend_Registry::get('firebug')->info($infos);
$objAnnonces = $infos->result->item; $objAnnonces = $infos->result->item;
$annonces = array(); $annonces = array();
@ -176,6 +179,8 @@ class JuridiqueController extends Zend_Controller_Action
if (!empty($type)){ if (!empty($type)){
$ws = new WsScores(); $ws = new WsScores();
$infos = $ws->getListeCompetences($siret, $type, $session->getCodeCommune()); $infos = $ws->getListeCompetences($siret, $type, $session->getCodeCommune());
if ($infos === false) $this->_forward('soap', 'error');
$competences = $infos->result->item; $competences = $infos->result->item;
Zend_Registry::get('firebug')->info($infos); Zend_Registry::get('firebug')->info($infos);
if( $type=='tri' || $type=='cfe' ) { if( $type=='tri' || $type=='cfe' ) {
@ -221,6 +226,8 @@ class JuridiqueController extends Zend_Controller_Action
$this->view->assign('raisonSociale', $session->getRaisonSociale()); $this->view->assign('raisonSociale', $session->getRaisonSociale());
$ws = new WsScores(); $ws = new WsScores();
$infos = $ws->getMarques($siren, $idObject); $infos = $ws->getMarques($siren, $idObject);
if ($infos === false) $this->_forward('soap', 'error');
$marques = $infos->result->item; $marques = $infos->result->item;
$this->view->assign('marques', $marques); $this->view->assign('marques', $marques);
$this->view->assign('idObject', $idObject); $this->view->assign('idObject', $idObject);