By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,848 Members | 1,319 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,848 IT Pros & Developers. It's quick & easy.

Soap : need help

P: 7
Hello
a customer ask me to write this php code in perl...
can someone help me please ?
Expand|Select|Wrap|Line Numbers
  1. <?
  2. $login='votre_login';
  3. $passwd='votre_mot_de_passe';
  4. $domain='votre_domaine';
  5.  
  6. $client = new SoapClient('https://url.wsdl',array('login'=> $login,'password'=> $passwd,'exceptions'=>'1'));
  7. $used_quota=$client->getDomUsedQuota($domain);
  8. print "Le quota consommé est $used_quota <br>";
  9. ?>
thanks for all!!!!
Feb 15 '08 #1
Share this Question
Share on Google+
9 Replies


numberwhun
Expert Mod 2.5K+
P: 3,503
Hello
a customer ask me to write this php code in perl...
can someone help me please ?
Expand|Select|Wrap|Line Numbers
  1. <?
  2. $login='votre_login';
  3. $passwd='votre_mot_de_passe';
  4. $domain='votre_domaine';
  5.  
  6. $client = new SoapClient('https://url.wsdl',array('login'=> $login,'password'=> $passwd,'exceptions'=>'1'));
  7. $used_quota=$client->getDomUsedQuota($domain);
  8. print "Le quota consommé est $used_quota <br>";
  9. ?>
thanks for all!!!!
Unfortunately, this is not a coding service. Instead, this is a learning forum. Why not try the conversion yourself and if you get stuck, post the code you have been trying here and we will try and help.

Regards,

Moderator
Feb 15 '08 #2

P: 7
here is my code but it doesn't work...


Expand|Select|Wrap|Line Numbers
  1. #!/usr/bin/perl
  2. use SOAP::Lite;
  3.  
  4. $tab = new SOAP::Lite
  5.  -> service('http://login:passwd@url.wsdl')
  6.  -> getProtectedDomains();
  7.  
  8.  
  9. print "$tab\n";
  10. foreach my $info (@{$tab}) {
  11.   print "$info\n";
  12. }
how can y give the login and the passwd like in the php code?
Feb 15 '08 #3

eWish
Expert 100+
P: 971
The SOAP::Lite module comes with examples. Check them out if the documentaion is not clear enough. I have not used this module and the documentation is not the best either. Sorry, I can't offer any more help.

--Keivn
Feb 15 '08 #4

P: 7
I don't find any answers... but i think it's not so hard...
Feb 16 '08 #5

P: 7
i try this
Expand|Select|Wrap|Line Numbers
  1. $service = SOAP::Lite
  2.                -> service('http://betasoap.protecmail.com/ws_protecmail.wsdl','login'=> $login,'password'=> $passwd,'exception
  3. s'=>'1');
but i get this :
Expand|Select|Wrap|Line Numbers
  1. Can't call method "new" on an undefined value at /usr/share/perl5/SOAP/Lite.pm line 3364.
help please ;)
Feb 17 '08 #6

P: 7
no one can help me please?
Feb 19 '08 #7

eWish
Expert 100+
P: 971
Check the Soap::Lite website and mailing list. Also, check out their Soap::Lite Cookbook for examples too.

If this does not help, then I would suggest that you post your question at perlmonks, I wish I could help more.

--Kevin
Feb 19 '08 #8

P: 7
I think it's almost this ...

Expand|Select|Wrap|Line Numbers
  1. #!/usr/bin/perl
  2. use SOAP::Lite +trace;
  3.  
  4. $login='log';
  5. $passwd='passwd';
  6. $domain='dom';
  7.  
  8. sub SOAP::Transport::HTTP::Client::get_basic_credentials {
  9.    return $login => $passwd;
  10.       }
  11.  
  12. $tab = SOAP::Lite
  13.                -> service('http://url.wsdl')
  14.                ->getDomUsedQuota($domain);
Feb 24 '08 #9

P: 7
ok i do in java... and it's work!!!
Mar 1 '08 #10

Post your reply

Sign in to post your reply or Sign up for a free account.