Exemplo n.º 1
0
 /**
  * 
  * Internal's Soap Client Used to send Soap to Provider
  * If "QA" set for provider it will return demi-value of true (bool)
  * 	
  * @return object SOAP result  
  */
 protected function sendArray()
 {
     $lastTransaction = $this->request->getHeaderField("MSG_TYPE");
     if (strtoupper($lastTransaction) == "DOWN_SYSTEM") {
         Application_Model_General::saveShutDownDetails("GT", "DOWN");
     } elseif (strtoupper($lastTransaction) == "UP_SYSTEM") {
         Application_Model_General::saveShutDownDetails("GT", "UP");
     }
     if (strtoupper($lastTransaction) == "PUBLISH") {
         $url = $this->getRecipientUrl();
         $client = $this->getSoapClient($url);
         $ret = $this->sendAgain($client);
     } else {
         $url = $this->getRecipientUrl();
         $client = $this->getSoapClient($url);
         $ret = $this->sendSoap($client);
     }
     if (!isset($ret) || !isset($ret->NP_ACK->ACK_CODE)) {
         return false;
     }
     $soapAckCode = $ret->NP_ACK->ACK_CODE;
     $request_id = $this->request->getHeaderField("REQUEST_ID");
     Application_Model_General::updateSoapAckCode($soapAckCode, $request_id, $lastTransaction, $this->request->getHeaderField("TRX_NO"));
     return $ret;
 }