/[openfoncier]/trunk/services/outgoing/messagesenderSoap.php
ViewVC logotype

Diff of /trunk/services/outgoing/messagesenderSoap.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1302 by nhaye, Mon Mar 4 11:43:25 2013 UTC revision 1320 by nhaye, Wed Mar 6 15:17:45 2013 UTC
# Line 35  define('HTTP_RESULT_OK', '200'); Line 35  define('HTTP_RESULT_OK', '200');
35   */   */
36  function postViaSOAP($msg) {  function postViaSOAP($msg) {
37      global $ARRETE_WSDL;      global $ARRETE_WSDL;
38      global $ARRETE_URL_WS;      global $ARRETE_LOGIN;
39        global $ARRETE_PASS;
40    
41      $data = $msg->body;      $data = $msg->body;
42      $data = json_decode($data);      $data = json_decode($data);
# Line 49  function postViaSOAP($msg) { Line 50  function postViaSOAP($msg) {
50      }      }
51    
52      // Instanciation du client SOAP      // Instanciation du client SOAP
53      $soapClient = new SoapClient($ARRETE_WSDL,array("trace" => AMQP_DEBUG));      $soapClient = new SoapClient($ARRETE_WSDL,array('trace' => AMQP_DEBUG,
54                                                        'exceptions' => true,
55                                                        // Auth credentials for the SOAP request.
56                                                        'login' => $ARRETE_LOGIN,
57                                                        'password' => $ARRETE_PASS,));
58    
59                                
60      $error = 0;      $error = 0;
61    
# Line 59  function postViaSOAP($msg) { Line 65  function postViaSOAP($msg) {
65          // accuse de reception du message              // accuse de reception du message    
66          $msg->delivery_info['channel']->          $msg->delivery_info['channel']->
67              basic_ack($msg->delivery_info['delivery_tag']);              basic_ack($msg->delivery_info['delivery_tag']);
68    
69            logger::instance()->cleanLog();
70            logger::instance()->log("Message envoye", EXTRA_VERBOSE_MODE);
71            logger::instance()->writeLogToFile();
72      } catch (SoapFault $fault) {      } catch (SoapFault $fault) {
73          // Gestion d'erreurs          // Gestion d'erreurs
74          $error = 1;          $error = 1;
# Line 86  function postViaSOAP($msg) { Line 96  function postViaSOAP($msg) {
96      // $info->ws_DA_Out_N_Doss_ADS      // $info->ws_DA_Out_N_Doss_ADS
97  }  }
98    
99    // pour des besoins de log il faut set $_SERVER["REQUEST_URI"]
100    if (!isset($_SERVER["REQUEST_URI"])) {
101        $_SERVER["REQUEST_URI"] = __FILE__;
102    }
103    
104  // si le $argv[1] manque on ne peut pas cree un tag unique pour le  // si le $argv[1] manque on ne peut pas cree un tag unique pour le
105  // consumeur et dans ce cas-la on termine l'execution  // consumeur et dans ce cas-la on termine l'execution
106  $suffix = '';  $suffix = '';

Legend:
Removed from v.1302  
changed lines
  Added in v.1320

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26