Compare commits

...

13 Commits

Author SHA1 Message Date
Claire DELBOS
12bd937a6c SD-36 2017-04-14 16:59:12 +02:00
Claire DELBOS
4d4df8e6cd SD-35 masquage avant recette 2017-04-14 15:54:17 +02:00
Claire DELBOS
c531173db2 SD-35 2017-04-14 15:29:57 +02:00
Claire DELBOS
a04ea0844d SD-38 2017-04-14 15:21:33 +02:00
Claire DELBOS
15496c7e1a Merge branch 'SD-32' into develop
Conflicts:
	application/modules/default/controllers/IdentiteController.php
2017-04-14 09:39:55 +02:00
Michael RICOIS
00b22c28e5 Better debug 2017-04-13 14:23:16 +02:00
Michael RICOIS
ef3842021f Debug Level 2017-04-13 12:11:34 +02:00
Michael RICOIS
cf5d50ea2e Réorganisation du debug 2017-04-13 11:42:07 +02:00
Michael RICOIS
d047c57d67 Session avec Scores_Ws_Client 2017-04-13 11:21:10 +02:00
Michael RICOIS
4f28b3fcb8 Merge branch 'develop' of git@gitlab.factory.insight.doubletrade.com:scores/extranet.git into develop 2017-04-13 10:41:36 +02:00
Michael RICOIS
1f90b825f4 Logger : Stop only at notice 2017-04-13 10:41:18 +02:00
benoitpotier
a6be515460 Merge branch 'develop' of gitlab.factory.insight.doubletrade.com:scores/extranet into develop 2017-04-12 11:32:39 +02:00
benoitpotier
c709e9c659 suppression specificité staging 2017-04-12 11:32:28 +02:00
13 changed files with 116 additions and 125 deletions

View File

@ -123,9 +123,9 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
if (APPLICATION_ENV == 'development') { if (APPLICATION_ENV == 'development') {
$level = Logger::DEBUG; $level = Logger::DEBUG;
} else { } else {
$level = Logger::INFO; $level = Logger::NOTICE;
} }
$log->pushHandler(new StreamHandler($logFile), $level); $log->pushHandler(new StreamHandler($logFile, $level));
// Processor // Processor
$log->pushProcessor(new IntrospectionProcessor()); $log->pushProcessor(new IntrospectionProcessor());

View File

@ -124,10 +124,9 @@ class IdentiteController extends Zend_Controller_Action
); );
$datemajTexte = $dateDerMaj = ''; $datemajTexte = $dateDerMaj = '';
$datemajTexte.= '<table>'; $datemajTexte.= '<table>';
foreach ( $tabDate as $dateId => $dateLib ) { foreach ($tabDate as $dateId => $dateLib ) {
if ( isset($infos->{$dateId}) if (isset($infos->{$dateId}) && !empty($infos->{$dateId})
&& !empty($infos->{$dateId}) && $infos->{$dateId}!='0000-00-00') {
&& $infos->{$dateId}!='0000-00-00') {
if ( $dateId == 'DateMajID') { if ( $dateId == 'DateMajID') {
$date = new Zend_Date($infos->DateMajID, 'yyyy-MM-dd'); $date = new Zend_Date($infos->DateMajID, 'yyyy-MM-dd');
@ -365,10 +364,10 @@ class IdentiteController extends Zend_Controller_Action
$user = new Scores_Utilisateur(); $user = new Scores_Utilisateur();
//Pagination //Pagination
$request = $this->getRequest(); $request = $this->getRequest();
$page = $request->getParam('page', 1); $page = $request->getParam('page', 1);
if ( $page <= 0 ) $page = 1; if ( $page <= 0 ) $page = 1;
$nbAffichage = 50; $nbAffichage = 50;
$position = ($page - 1 ) * $nbAffichage; $position = ($page - 1 ) * $nbAffichage;
$ws = new WsScores(); $ws = new WsScores();
@ -701,7 +700,7 @@ class IdentiteController extends Zend_Controller_Action
$session = new Scores_Session_Entreprise($siren, null, true); $session = new Scores_Session_Entreprise($siren, null, true);
$this->view->assign('siren', $siren); $this->view->assign('siren', $siren);
$this->view->assign('siret', $session->getSiret()); $this->view->assign('siret', $session->getSiret());
$this->view->assign('isin', $session->getIsin()); $this->view->assign('isin', $session->getIsin());
$this->view->assign('surveillance', $user->checkPerm('survdirigeants')); $this->view->assign('surveillance', $user->checkPerm('survdirigeants'));
} }
@ -727,7 +726,7 @@ class IdentiteController extends Zend_Controller_Action
$this->view->assign('isin', $session->getIsin()); $this->view->assign('isin', $session->getIsin());
$this->view->assign('siren', $siren); $this->view->assign('siren', $siren);
$this->view->assign('siret', $this->siret); $this->view->assign('siret', $this->siret);
$this->view->assign('raisonSociale', $session->getRaisonSociale()); $this->view->assign('raisonSociale', $session->getRaisonSociale());
$this->view->assign('surveillance', $user->checkPerm('liens')); $this->view->assign('surveillance', $user->checkPerm('liens'));
//Check access to display group link //Check access to display group link
@ -750,18 +749,18 @@ class IdentiteController extends Zend_Controller_Action
$this->view->assign('PP', true); $this->view->assign('PP', true);
//@todo : using this function is strange - How to get the id before ? //@todo : using this function is strange - How to get the id before ?
$result = $ws->searchLienRef($siren, 'siren'); $result = $ws->searchLienRef($siren, 'siren');
if (count($result->item)>0) { if (count($result->item)>0) {
foreach ($result->item as $item) { foreach ($result->item as $item) {
$id = $item->id; $id = $item->id;
break; break;
} }
} }
$result = $ws->getLienRef($id); $result = $ws->getLienRef($id);
$this->view->assign('nom', $result->nom); $this->view->assign('nom', $result->nom);
$this->view->assign('prenom', $result->prenom); $this->view->assign('prenom', $result->prenom);
$this->view->assign('civilite', $result->civilite); $this->view->assign('civilite', $result->civilite);
$this->view->assign('naissanceDate', $result->naissance_Date); $this->view->assign('naissanceDate', $result->naissance_Date);
} }
@ -827,7 +826,7 @@ class IdentiteController extends Zend_Controller_Action
$this->_helper->layout()->disableLayout(); $this->_helper->layout()->disableLayout();
$request = $this->getRequest(); $request = $this->getRequest();
//@todo : //@todo : mise a jour reguliere
$pays = array( $pays = array(
'FRA' => "France", 'FRA' => "France",
'AND' => "Andorre", 'AND' => "Andorre",
@ -1237,55 +1236,49 @@ class IdentiteController extends Zend_Controller_Action
$this->_helper->layout()->disableLayout(); $this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true); $this->_helper->viewRenderer->setNoRender(true);
// --- En environement de preprod, on envoi sur le site
if (APPLICATION_ENV == 'staging') {
$this->redirect('http://avis-situation-sirene.insee.fr/');
}
// --- Téléchargement du fichier et distribution // --- Téléchargement du fichier et distribution
else { $avis = new Scores_Insee_AvisSituation($this->siret);
$avis = new Scores_Insee_AvisSituation($this->siret); if ( !$avis->erreur() ) {
if ( !$avis->erreur() ) { $avis->erreurcpt('raz');
$avis->erreurcpt('raz'); $file = $avis->get();
$file = $avis->get(); if ($file === false) {
if ($file === false) { $avis->erreurcpt('plus');
$avis->erreurcpt('plus'); echo $avis->erreurmsg();
echo $avis->erreurmsg(); } else {
} else { // --- Envoi du fichier sur la sortie standard
// --- Envoi du fichier sur la sortie standard $content_type = 'application/pdf';
$content_type = 'application/pdf'; if ( file_exists($file) ) {
if ( file_exists($file) ) { $ws = new WsScores();
$ws = new WsScores(); $ws->setLog('avis_situation', $this->siret, 0, '');
$ws->setLog('avis_situation', $this->siret, 0, ''); $modules = array(); //apache_get_modules();
$modules = array(); //apache_get_modules(); if (in_array('mod_xsendfile', $modules)) {
if (in_array('mod_xsendfile', $modules)) { header ('X-Sendfile: ' . $file);
header ('X-Sendfile: ' . $file); header ('Content-Type: ' . $content_type);
header ('Content-Type: ' . $content_type); header ('Content-Disposition: attachment; filename="' . $content_type . '"');
header ('Content-Disposition: attachment; filename="' . $content_type . '"'); exit;
exit;
} else {
ini_set('zlib.output_compression', '0');
header('Content-Transfer-Encoding: none');
header('Content-Type: ' . $content_type.'');
header('Content-Length: ' . filesize($file));
header('Content-MD5: ' . base64_encode(md5_file($file)));
header('Content-Disposition: attachment; filename="' . basename($file) . '"');
header('Cache-Control: private, max-age=0, must-revalidate');
header('Pragma: public');
readfile($file);
exit;
}
} else { } else {
echo "Impossible de charger le fichier"; ini_set('zlib.output_compression', '0');
header('Content-Transfer-Encoding: none');
header('Content-Type: ' . $content_type.'');
header('Content-Length: ' . filesize($file));
header('Content-MD5: ' . base64_encode(md5_file($file)));
header('Content-Disposition: attachment; filename="' . basename($file) . '"');
header('Cache-Control: private, max-age=0, must-revalidate');
header('Pragma: public');
readfile($file);
exit;
} }
} else {
echo "Impossible de charger le fichier";
} }
} else { }
if ($avis->nberreur()==5){ } else {
$avis->mailerreur(); if ($avis->nberreur()==5){
} $avis->mailerreur();
$avis->erreurcpt('plus'); }
echo $avis->erreurmsg(); $avis->erreurcpt('plus');
} echo $avis->erreurmsg();
} }
} }
/** /**

View File

@ -477,7 +477,7 @@ class JuridiqueController extends Zend_Controller_Action
$this->view->assign('message', $infos); $this->view->assign('message', $infos);
} }
$objAnnonces = $infos->result->item; $objAnnonces = isset($infos->result->item)?$infos->result->item:null;
$annonces = array(); $annonces = array();
if (count($objAnnonces)>0) { if (count($objAnnonces)>0) {
foreach ( $objAnnonces as $item ) { foreach ( $objAnnonces as $item ) {

View File

@ -103,14 +103,15 @@ class MandataireController extends Zend_Controller_Action
$tabMandataires = $request->getParam('tabMandataires'); $tabMandataires = $request->getParam('tabMandataires');
} }
//Les tribunaux
$tmp = $ws->getTribunaux(array('C','I','G')); //
$tribunaux = $tmp->result->item;
if ($tribunal!='') { if ($tribunal!='') {
//La cour d'appel suivant le tribunal sélectionné //La cour d'appel suivant le tribunal sélectionné
$codeCourAppel = $ws->getIdCoursAppel($tribunal); $codeCourAppel = $ws->getIdCoursAppel($tribunal);
//Les tribunaux
$tmp = $ws->getTribunaux(array('C','I','G')); //
$tribunaux = $tmp->result->item;
}else{ }else{
$message = 'Pas de tribunal sélectionné.'; $message = 'Pas de tribunal sélectionné.';
} }

View File

@ -493,7 +493,7 @@ class SaisieController extends Zend_Controller_Action
$this->view->assign('ListeTribunaux', $listeTribunaux); $this->view->assign('ListeTribunaux', $listeTribunaux);
/** /**
* table des événements en dur * table des événements en dur
* @todo verifier si liste à jour * @todo verifier si liste à jour derniere maj : ?
*/ */
$selectEvent = array( $selectEvent = array(
'1100', '1101' , '1200', '1201', '1300', '1301', '1302', '1303', '1304', '1305', '1306', '1100', '1101' , '1200', '1201', '1300', '1301', '1302', '1303', '1304', '1305', '1306',
@ -2367,7 +2367,7 @@ class SaisieController extends Zend_Controller_Action
$message = ''; $message = '';
$getcutoff = null; $getcutoff = null;
if ( $request->isXmlHttpRequest() ) { if ( $request->isXmlHttpRequest() ) {
$this->_helper->layout()->disableLayout(); $this->_helper->layout()->disableLayout();
$params = $request->getParams(); $params = $request->getParams();
@ -2415,7 +2415,8 @@ class SaisieController extends Zend_Controller_Action
else { else {
if ( $request->isPost() ) { if ( $request->isPost() ) {
// check values one more time $message='';
// check values one more time
$paramlist = array( $paramlist = array(
'siren' => 'Siren', 'siren' => 'Siren',
'encours' => 'Encours', 'encours' => 'Encours',
@ -2434,7 +2435,7 @@ class SaisieController extends Zend_Controller_Action
} }
} }
// end checking values // end checking values
if(!isset($params['delete'])) $params['delete']=false;
if ( $message == '' ) { if ( $message == '' ) {
$message = $ws->setScoreCutoff( $message = $ws->setScoreCutoff(
$params['siren'], $params['siren'],
@ -2907,6 +2908,9 @@ class SaisieController extends Zend_Controller_Action
$this->_helper->layout()->disableLayout(); $this->_helper->layout()->disableLayout();
$request = $this->getRequest(); $request = $this->getRequest();
$siren = $request->getParam('siren', null); $siren = $request->getParam('siren', null);
if(empty($siren)){
throw(new Exception('Parametres errones'));
}
$mode = $request->getParam('mode'); $mode = $request->getParam('mode');
$guichetMod = $request->getParam('guichetMod'); $guichetMod = $request->getParam('guichetMod');
$banqueMod = $request->getParam('banqueMod'); $banqueMod = $request->getParam('banqueMod');
@ -2922,7 +2926,12 @@ class SaisieController extends Zend_Controller_Action
$ws = new Scores_Ws_Client('saisie', '0.2'); $ws = new Scores_Ws_Client('saisie', '0.2');
$result = $ws->getRib($params); $result = $ws->getRib($params);
} }
$this->view->assign('siren', $siren); $tab=(array)json_decode($result);
$oldvals=implode('####',$tab);
//$olddvals->siren=$siren;
//var_dump($oldvals);die;
$this->view->assign('oldvals', urlencode($result));
$this->view->assign('siren', $siren);
$this->view->assign('mode', $mode); $this->view->assign('mode', $mode);
$this->view->assign('banques', $result); $this->view->assign('banques', $result);
@ -2935,6 +2944,7 @@ class SaisieController extends Zend_Controller_Action
public function ribansaveAction(){ public function ribansaveAction(){
$this->_helper->layout()->disableLayout(); $this->_helper->layout()->disableLayout();
$request = $this->getRequest(); $request = $this->getRequest();
//var_dump($request->getParams());die;
$params= new stdClass(); $params= new stdClass();
$values=array( $values=array(
'siren' => str_replace(' ', '',$request->getParam('siren')), 'siren' => str_replace(' ', '',$request->getParam('siren')),
@ -2943,47 +2953,22 @@ class SaisieController extends Zend_Controller_Action
'numCompte' => str_replace(' ', '',$request->getParam('num_compte')), 'numCompte' => str_replace(' ', '',$request->getParam('num_compte')),
'bic' => str_replace(' ', '',$request->getParam('bic_swift')), 'bic' => str_replace(' ', '',$request->getParam('bic_swift')),
'iban' => str_replace(' ', '',$request->getParam('iban')), 'iban' => str_replace(' ', '',$request->getParam('iban')),
'oldvals' => urldecode($request->getParam('oldvals')),
'mode' => $request->getParam('mode'), 'mode' => $request->getParam('mode'),
); );
$params->infos=json_encode($values); $params->infos=json_encode($values);
//echo $values['oldvals'];die;
$ws = new Scores_Ws_Client('saisie', '0.2'); $ws = new Scores_Ws_Client('saisie', '0.2');
$result = $ws->setRib($params); $result = $ws->setRib($params);
if($result){ if($result==true or $result==1){
echo 'Opération enregistrée'; echo 'Opération enregistrée';
}else { }else {
echo 'Opération échouée '; echo 'Opération non enregistrée '.$result;
} }
die; die;
} }
public function testwsAction(){
$c = Zend_Registry::get('config');
$wsdl = 'http://webservice.sd.dev/saisie/v0.2?wsdl-auto';
$options = array( '0.2' => array(
'setRib' => array(
'debug' => true,
'log' => 'mail',
),
),
);
$options['features'] = SOAP_USE_XSI_ARRAY_TYPE + SOAP_SINGLE_ELEMENT_ARRAYS;
$options['compression'] = SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP | SOAP_COMPRESSION_DEFLATE;
$options['login'] = 'cdelbos';
$options['password'] = 'coucou';
if (APPLICATION_ENV == 'development'){
$options['cache_wsdl'] = WSDL_CACHE_NONE;
}
$options['trace'] = true;
$options['encoding'] = 'utf-8';
$client = false;
$client = new SoapClient($wsdl, $options);
$params = new stdClass();
$params->infos=json_encode(array('siren' => '809613144','mode' => 'add', 'codeBanque' => '20041'));
$reponse = $client->setRib($params);
var_dump($reponse);die;
}

View File

@ -1,5 +1,5 @@
<div id="center"> <div id="center">
<?php if ($message!='') { ?> <?php if (isset($message) && $message!='') { ?>
<div style="margin:5px; padding: 0pt 0.7em;" class="ui-state-highlight ui-corner-all"> <div style="margin:5px; padding: 0pt 0.7em;" class="ui-state-highlight ui-corner-all">
<p><span style="float: left; margin-right: 0.3em;" class="ui-icon ui-icon-info"></span> <p><span style="float: left; margin-right: 0.3em;" class="ui-icon ui-icon-info"></span>
<?=$message?></p> <?=$message?></p>

View File

@ -26,17 +26,17 @@ if ( $this->saisie['source']=='JT' ){ $select = 'selected'; }
<div id="dateParution"> <div id="dateParution">
<label>Date de parution <font color="Red">*</font></label> <label>Date de parution <font color="Red">*</font></label>
<input class="date" type="text" name="jugement[dateParution]" size="10" maxlength="10" value="<?=$this->saisie['dateParution']?>" /> <input class="date" type="text" name="jugement[dateParution]" size="10" maxlength="10" value="<?=isset($this->saisie['dateParution'])?$this->saisie['dateParution']:''?>" />
<span class="left">(Format JJ/MM/AAAA)</span> <span class="left">(Format JJ/MM/AAAA)</span>
</div> </div>
<div id="numParution"> <div id="numParution">
<label>N&deg; de parution</label> <label>N&deg; de parution</label>
<input type="text" name="jugement[numParution]" size="10" maxlength="10" value="<?=$this->saisie['numParution']?>" /> <input type="text" name="jugement[numParution]" size="10" maxlength="10" value="<?=isset($this->saisie['numParution'])?$this->saisie['numParution']:''?>" />
</div> </div>
<label>Date &eacute;v&egrave;nement / jugement<font color="Red">*</font></label> <label>Date &eacute;v&egrave;nement / jugement<font color="Red">*</font></label>
<input class="date" type="text" name="jugement[dateJuge]" size="10" maxlength="10" value="<?=$this->saisie['dateJugement']?>" /> <input class="date" type="text" name="jugement[dateJuge]" size="10" maxlength="10" value="<?=isset($this->saisie['dateJugement'])?$this->saisie['dateJugement']:''?>" />
<span class="left">(Format JJ/MM/AAAA)</span> <span class="left">(Format JJ/MM/AAAA)</span>
<label>Tribunal <font color="Red">*</font></label> <label>Tribunal <font color="Red">*</font></label>

View File

@ -16,6 +16,7 @@ $lbanque = (array)json_decode($this->banques);
<form name="saveRiban" action="<?=$this->url(array('controller'=>'saisie', 'action'=>'ribansave'),null, true)?>" method="post"> <form name="saveRiban" action="<?=$this->url(array('controller'=>'saisie', 'action'=>'ribansave'),null, true)?>" method="post">
<input type="hidden" name="mode" value="<?=$this->mode?>" /> <input type="hidden" name="mode" value="<?=$this->mode?>" />
<input type="hidden" name="siren" value="<?=$this->siren?>" /> <input type="hidden" name="siren" value="<?=$this->siren?>" />
<input type="hidden" name="oldvals" value="<?=$this->oldvals?>" />
<?php if($this->mode == 'add' || $this->mode == 'edit'){?> <?php if($this->mode == 'add' || $this->mode == 'edit'){?>
<div class="fieldgrp"> <div class="fieldgrp">
<label>Siren</label> <label>Siren</label>
@ -163,8 +164,8 @@ $('#dialog').dialog({ buttons: [
var form = $('form[name=saveRiban]'); var form = $('form[name=saveRiban]');
$.post(form.attr('action'), form.serialize(), function(data){ $.post(form.attr('action'), form.serialize(), function(data){
form.replaceWith(data); form.replaceWith(data);
}).done(function(data){ alert(data); }).done(function(data){ $('.ui-dialog-buttonset').hide();
}).fail(function(){ alert('Unknow error'); }); }).fail(function(){ });
} }, } },
{ text: "Annuler", click: function() { $(this).dialog("close"); } } { text: "Annuler", click: function() { $(this).dialog("close"); } }
] }); ] });

View File

@ -31,10 +31,11 @@ if ( empty($this->source) ){
<h2>Traitements de masse</h2> <h2>Traitements de masse</h2>
<div class="paragraph"> <div class="paragraph">
<?=$this->action('surveillancecsv', 'surveillance')?> <?=$this->action('surveillancecsv', 'surveillance')?>
<!--
<p class="options">Demande de surveillance en série : <p class="options">Demande de surveillance en série :
<a class="dialogsurv" href="/surveillance/surveillanceserie" title="Demande de surveillance en série "> <a class="dialogsurv" href="/surveillance/surveillanceserie" title="Demande de surveillance en série ">
OK</a></p> OK</a></p>
-->
</div> </div>
<h2>Options de recherche</h2> <h2>Options de recherche</h2>

View File

@ -255,7 +255,7 @@ class Annonces
} else { } else {
$tabSource = explode('-', $ann->BodaccCode); $tabSource = explode('-', $ann->BodaccCode);
$source = $tabSource[0]; $source = $tabSource[0];
$idSource = $tabSource[1]; $idSource = isset($tabSource[1])?$tabSource[1]:null;
if ($source[0] == 'B') { if ($source[0] == 'B') {
$title = 'Source BODACC ' . $ann->BodaccNum . ' ' . $title = 'Source BODACC ' . $ann->BodaccNum . ' ' .
substr($source,-1) . ' ' . substr($source,-1) . ' ' .
@ -316,7 +316,7 @@ class Annonces
$lib.= $even->LibEven; $lib.= $even->LibEven;
$tabSource = explode('-', $ann->BodaccCode); $tabSource = explode('-', $ann->BodaccCode);
$source = $tabSource[0]; $source = $tabSource[0];
$idSource = $tabSource[1]; $idSource = isset($tabSource[1])?$tabSource[1]:null;
$numEven = $even->CodeEven*1; $numEven = $even->CodeEven*1;
if ($numEven>3000 && $numEven<3999) { if ($numEven>3000 && $numEven<3999) {
if (isset($ann->dateEffet)){ if (isset($ann->dateEffet)){

View File

@ -123,10 +123,11 @@ class Scores_Session_Entreprise
protected function getInfoEntrep($siret, $id = 0) protected function getInfoEntrep($siret, $id = 0)
{ {
$this->logger->info('getInfoEntrep'); $ws = new Scores_Ws_Client('interne', '0.6');
require_once 'Scores/WsScores.php'; $params = new stdClass();
$ws = new WsScores(); $params->siret = $this->siret;
$etab = $ws->getIdentiteLight($siret, $id); $params->id = $this->id;
$etab= $ws->getIdentiteLight($params);
$this->setSession($etab); $this->setSession($etab);
} }

View File

@ -147,7 +147,7 @@ class Scores_Ws_Client extends Zend_Soap_Client
} }
$methodConfig = $this->config[$name]; $methodConfig = $this->config[$name];
$this->logger->info(print_r($methodConfig,1));
// --- Cache // --- Cache
$cacheEnable = false; $cacheEnable = false;
if ( array_key_exists('cache', $methodConfig) ) { if ( array_key_exists('cache', $methodConfig) ) {
@ -172,17 +172,22 @@ class Scores_Ws_Client extends Zend_Soap_Client
// --- Debug // --- Debug
if ( array_key_exists('debug', $methodConfig) ) { if ( array_key_exists('debug', $methodConfig) ) {
$this->logger->info(__CLASS__.'->'.$name); $this->logger->info(__CLASS__.'->'.$name.':'.print_r($arguments,1));
$this->logger->info(print_r($arguments,1));
} }
try { try {
$response = parent::__call($name, $arguments); $response = parent::__call($name, $arguments);
// --- Response vide
if ($response == '') {
$this->logger->error(__CLASS__.'->'.$name.':'.print_r($arguments, 1));
return false;
}
// --- Debug // --- Debug
if ( array_key_exists('debug', $methodConfig) ) { if ( array_key_exists('debug', $methodConfig) ) {
$this->logger->info(print_r($response,1)); $this->logger->info(__CLASS__.'->'.$name.':'.print_r($response,1));
} }
// --- Cache // --- Cache
@ -196,13 +201,13 @@ class Scores_Ws_Client extends Zend_Soap_Client
// --- Debug // --- Debug
if ( array_key_exists('debug', $methodConfig) ) { if ( array_key_exists('debug', $methodConfig) ) {
$this->logger->info($fault->faultcode.' - '.$fault->faultstring); $this->logger->error(__CLASS__.'->'.$name.':'.$fault->faultcode.' - '.$fault->faultstring);
} }
// --- Gestion des SOAP fault // --- Gestion des SOAP fault
if ( array_key_exists('errorMsg', $methodConfig) ) { if ( array_key_exists('errorMsg', $methodConfig) ) {
if ( in_array($fault->faultcode, $methodConfig['errorMsg']) ) { if ( in_array($fault->faultcode, $methodConfig['errorMsg']) ) {
$this->logger->info("Exception as error message : ".$fault->faultcode); $this->logger->info(__CLASS__.'->'.$name.':'." Exception as error message : ".$fault->faultcode);
throw new Exception($fault->faultstring); throw new Exception($fault->faultstring);
} }
} }

View File

@ -1,6 +1,10 @@
<?php <?php
return array( return array(
'0.6' => array( '0.6' => array(
'getIdentiteLight' => array(
'debug' => true,
'log' => 'mail',
),
'getRncsEven' => array( 'getRncsEven' => array(
'debug' => true, 'debug' => true,
'log' => 'mail', 'log' => 'mail',