__getLastRequest()) . '

' . 'Response : '. htmlspecialchars($clientSoap->__getLastResponse()) . '

'; $message.= '
'; $message.= 'Informations de debug :
'; $message.= '
';
	$message.= 'REQUEST : '.print_r($_REQUEST,true).'

'; $message.= 'SERVER : '.print_r($_REQUEST,true).'

'; $message.= 'SESSION : '.print_r($_SESSION,true).'

'; $message.= 'ENV : '.print_r($_ENV,true).'

'; $message.= 'tabInfo : '.print_r($tabInfo,true).'

'; $message.= '
'; if($debug == TRUE){ print '
';
		print $message;
		print '
'; }else{ graydon_mailSoapFault($message); $message = graydon_messageSoapFault(); } return $message; } /** * Affiche un message d'erreur sympatique pour le client. * @return string */ function graydon_messageSoapFault(){ (defined('ERROR_SOAP')) ? ($message = ERROR_SOAP) : ($message = "Une erreur est survenue lors de votre requête") ; return $message; } /** * Envoi de l'erreur Soap par mail. * @param string $message * @return void */ function graydon_mailSoapFault($message){ $mail = new PHPMailer(); $mail->From = "contact@scores-decisions.com"; $mail->FromName = "Serveur SD-13408"; $mail->Host = "mail.scores-decisions.com"; $mail->Mailer = "smtp"; $mail->Subject = "Erreur SOAP - (Date :".date("d")."/".date("m")."/".date("Y").")"; $body = $message; $mail->MsgHTML($body); $mail->AddAddress(EMAIL_SUPPORTDEV, "Support"); if(!$mail->Send()) { logSoapFault($mail->ErrorInfo); } } /** * Fonction qui enregistre les messages d'erreur dans un log. * @param string $message * @return void */ function graydon_logSoapFault($message){ echo $message; } function graydon_error($code, $text){ $tabError = array( 0 => array( "Code" => "CWS0112", "Text" => "Country or Countries specified not valid" ), 1 => array( "Code" => "CWS0113", "Text" => "Country is not enabled for matchByIdentifier" ), 2 => array( "Code" => "CWS5000", "Text" => "No match results found for subject company" ), ); $returnError = FALSE; foreach($tabError as $error){ if($code == $error['Code']){ $returnError = $error; break; } } return $returnError; } ?>