siren=$siren; $client = new SoapClient('http://ws.scores-decisions.com/entreprise/vat.wsdl', array( 'trace' => 1, 'soap_version' => SOAP_1_1, 'login' => 'TESTTVA', 'password' => 'TVATESTPW')); try { $O = $client->getCompanyVat($this->siren); if ($O->error->errnum) { //echo 'Erreur : '. $O->error->errmsg .' ('. $O->error->errnum .")\n"; //echo $client->__getLastResponse()."\n"; $this->errnum=$O->error->errnum; $this->errmsg=$O->error->errmsg; return false; } else { $val=$O->result; $this->vatNumber=$val->vatNumber; $this->vatDefined=$val->vatDefined; } } catch (SoapFault $fault) { //echo $client->__getLastResponse()."\n"; //echo 'ERREUR SOAP :'.EOL; //print_r($fault); return false; } } } ?>