in reply to Re: pb with Soap::lite
in thread pb with Soap::lite

sorry i forgot a piece of code... here it is :
#!/usr/bin/perl use SOAP::Lite +trace; $login='log'; $passwd='pass'; $domain='dom' $tab = SOAP::Lite -> service('http://url.wsdl','login'=>$login,'password'=> $pass +wd,'exceptions'=>'1') ->getDomUsedQuota($domain); print "$tab\n";
And herre is the php code... if it can help you (me not)
<? $login='votre_login'; $passwd='votre_mot_de_passe'; $domain='votre_domaine'; <code> $client = new SoapClient('https://url.wsdl',array('login'=> $login,'pa +ssword'=> $passwd,'exceptions'=>'1')); $used_quota=$client->getDomUsedQuota($domain); print "Le quota consommé est $used_quota <br>"; ?>
I try "+trace", but it doesn't help me... i'm too novice in perl and soap... ;-) Thanks in advance

Replies are listed 'Best First'.
Re^3: pb with Soap::lite
by olus (Curate) on Feb 21, 2008 at 12:07 UTC

    If you try to access the service using basic authentication, then you might try adding the code below to provide the auth info when requested.

    ... sub SOAP::Transport::HTTP::Client::get_basic_credentials { return 'username' => 'password'; } my $service = SOAP::Lite -> service('http://url.wsdl'); ...
      thanks but it still not work... i have ab authentification error... i try this :
      #!/usr/bin/perl use SOAP::Lite +trace; $login='log'; $passwd='passwd'; $domain='dom'; sub SOAP::Transport::HTTP::Client::get_basic_credentials { return $login => $passwd; } $tab = SOAP::Lite -> service('http://url.wsdl') ->getDomUsedQuota($domain); ...
      I've got an authentification error... I think it's almost this ...