aminoo aminoo - 11 months ago 53
PHP Question

Soap authentification failed

I'm used to writing PHP code for a SOAP call
and this is my code

$client = new SoapClient("");
$param = array('NomUtilisateur' => 'XXXXXX','MotDePasse' => 'XXYYZZ','ContenuDuMessage' => '');
$values = $client->TariferSante($param);



when i execute the script I get an authentification error message:

object(stdClass)#2 (1) { ["TariferSanteResult"]=> string(109)
"err_authentification" }

the used parameters are true, you can try with this link:


updated Answer : i tried this code and it worked

$options = array(


class TariferSante {

    public $nomUtilisateur;
    public $motDePasse;
    public $contenuDuMessage;
$client = new SoapClient("",$options);

$param = new TariferSante();
$param->nomUtilisateur = "XXXXXXX";
$param->motDePasse = "XXYYZZ";
$param->contenuDuMessage = "";
$values = $client->TariferSante($param);
echo "Request".htmlspecialchars($client->__getLastRequest());