diff --git a/application/modules/default/controllers/SaisieController.php b/application/modules/default/controllers/SaisieController.php
index d542253d2..ece0765d8 100644
--- a/application/modules/default/controllers/SaisieController.php
+++ b/application/modules/default/controllers/SaisieController.php
@@ -728,18 +728,21 @@ class SaisieController extends Zend_Controller_Action
if ($sourceNum === false) {
echo "Source inconnu"; exit;
}
- $ws = new WsScores();
- $reponse = $ws->dupliqueAnnonce($sourceNum, $idan, $siretIn, $siretOut);
- $error = $reponse->error;
- if ( isset($error) && $error->errnum == 0 ){
- $output = 'Annonce '.$idan.' dupliqué sur '.$siretOut.'!';
- } elseif ( isset($error) && $error->errnum != 0 ) {
- $output = 'Erreur lors de la duplication.';
- } else {
- $output = "Une erreur est survenue...";
- }
- echo $output;
+ // Version new
+ $ws = new Scores_Ws_Client('saisie', '0.2');
+ $params = new stdClass();
+ $params->source = $sourceNum;
+ $params->idAnn = $idan;
+ $params->siretIn = $siretIn;
+ $params->siretOut = $siretOut;
+ $devp=array('sourceNum' => $sourceNum,'idan' => $idan,'siretIn' => $siretIn, 'siretOut' => $siretOut);
+ $infos = $ws->dupliqueAnnonce($params);
+ if ($infos === false) {
+ echo 'Erreur du Webservice';
+ $this->forward('soap', 'error');
+ }
+ echo $infos->error->errmsg;
break;
case 'edit':
diff --git a/application/modules/default/views/default/scripts/saisie/annoncedialog.phtml b/application/modules/default/views/default/scripts/saisie/annoncedialog.phtml
index e48aeac94..88cfdb03d 100644
--- a/application/modules/default/views/default/scripts/saisie/annoncedialog.phtml
+++ b/application/modules/default/views/default/scripts/saisie/annoncedialog.phtml
@@ -87,13 +87,21 @@ $('select[name="even[]"]').change(function(){
diff --git a/library/Scores/Ws/Client.php b/library/Scores/Ws/Client.php
index 05da83b9f..c1c3e4570 100644
--- a/library/Scores/Ws/Client.php
+++ b/library/Scores/Ws/Client.php
@@ -166,7 +166,7 @@ class Scores_Ws_Client extends Zend_Soap_Client
Zend_Registry::get('firebug')->info($arguments);
}
- try {
+ //try {
$response = parent::__call($name, $arguments);
@@ -182,7 +182,7 @@ class Scores_Ws_Client extends Zend_Soap_Client
return $response->{$name.'Result'};
- } catch ( SoapFault $fault ) {
+ /*} catch ( SoapFault $fault ) {
// --- Debug
if ( array_key_exists('debug', $methodConfig) ) {
@@ -228,7 +228,7 @@ class Scores_Ws_Client extends Zend_Soap_Client
}
return false;
- }
+ }*/
}
/**
diff --git a/library/Scores/Ws/Client/Saisie.php b/library/Scores/Ws/Client/Saisie.php
index b0c1b4dc9..176fe28dc 100644
--- a/library/Scores/Ws/Client/Saisie.php
+++ b/library/Scores/Ws/Client/Saisie.php
@@ -5,5 +5,9 @@ return array(
'debug' => true,
'log' => 'mail',
),
+ 'dupliqueAnnonce' => array(
+ 'debug' => true,
+ 'log' => 'mail',
+ ),
)
);
\ No newline at end of file