First sorry for my bad english, I'm French

I'm begginer with OTRS and Php. I want to use SOAP interface to integrate OTRS client directly on my website. So i decided to create a php class with all functions i will need to do that.
here is my construct function (php) :
Code: Select all
class PhpSoap{
var $soapclient;
var $soap_error = false;
var $user = "remote_user";
var $pass = "****";
var $url = "http://****/otrs/rpc.pl";
function __construct() {
// Pour supprimer le cache du web-service
ini_set('soap.wsdl_cache_enabled', 0);
// Pour définir le temp maximal d'éxecution de notre web-service
ini_set('default_socket_timeout', 180);
$error = false;
try{
$this->soapclient = new SoapClient(null, array('location' => $this->url,
'uri' => "Core",
'trace' => 1,
'login' => $this->user,
'password' => $this->pass,
'style' => SOAP_RPC,
'use' => SOAP_ENCODED));
return $this->soapclient;
}
catch(SoapFault $soap_error){
$error = true;
$this->soap_error = $soap_error;
echo "<hr/>".$soap_error."<hr/>";
}
}
$otrs = new PhpSoap();
But if I write a wrong password/username, no error are catch, but in my otrs log I can see :
Code: Select all
[Mon Mar 21 09:18:39 2011][Notice][Core::Dispatch] Auth for user remote_user (pw test) failed!
Thanks a lot