Soap : need help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • manuds
    New Member
    • Feb 2008
    • 7

    Soap : need help

    Hello
    a customer ask me to write this php code in perl...
    can someone help me please ?
    [CODE=PHP]<?
    $login='votre_l ogin';
    $passwd='votre_ mot_de_passe';
    $domain='votre_ domaine';

    $client = new SoapClient('htt ps://url.wsdl',array ('login'=> $login,'passwor d'=> $passwd,'except ions'=>'1'));
    $used_quota=$cl ient->getDomUsedQuot a($domain);
    print "Le quota consommé est $used_quota <br>";
    ?>[/CODE]

    thanks for all!!!!
    Last edited by eWish; Feb 15 '08, 04:38 PM. Reason: Please use [CODE][/CODE] tags
  • numberwhun
    Recognized Expert Moderator Specialist
    • May 2007
    • 3467

    #2
    Originally posted by manuds
    Hello
    a customer ask me to write this php code in perl...
    can someone help me please ?
    [CODE=PHP]<?
    $login='votre_l ogin';
    $passwd='votre_ mot_de_passe';
    $domain='votre_ domaine';

    $client = new SoapClient('htt ps://url.wsdl',array ('login'=> $login,'passwor d'=> $passwd,'except ions'=>'1'));
    $used_quota=$cl ient->getDomUsedQuot a($domain);
    print "Le quota consommé est $used_quota <br>";
    ?>[/CODE]

    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

    Comment

    • manuds
      New Member
      • Feb 2008
      • 7

      #3
      here is my code but it doesn't work...


      Code:
      #!/usr/bin/perl
      use SOAP::Lite;
      
      $tab = new SOAP::Lite
       -> service('http://login:passwd@url.wsdl')
       -> getProtectedDomains();
      
      
      print "$tab\n";
      foreach my $info (@{$tab}) {
        print "$info\n";
      }
      how can y give the login and the passwd like in the php code?

      Comment

      • eWish
        Recognized Expert Contributor
        • Jul 2007
        • 973

        #4
        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

        Comment

        • manuds
          New Member
          • Feb 2008
          • 7

          #5
          I don't find any answers... but i think it's not so hard...

          Comment

          • manuds
            New Member
            • Feb 2008
            • 7

            #6
            i try this
            Code:
            $service = SOAP::Lite
                           -> service('http://betasoap.protecmail.com/ws_protecmail.wsdl','login'=> $login,'password'=> $passwd,'exception
            s'=>'1');
            but i get this :
            Code:
            Can't call method "new" on an undefined value at /usr/share/perl5/SOAP/Lite.pm line 3364.
            help please ;)

            Comment

            • manuds
              New Member
              • Feb 2008
              • 7

              #7
              no one can help me please?

              Comment

              • eWish
                Recognized Expert Contributor
                • Jul 2007
                • 973

                #8
                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

                Comment

                • manuds
                  New Member
                  • Feb 2008
                  • 7

                  #9
                  I think it's almost this ...

                  Code:
                  #!/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);

                  Comment

                  • manuds
                    New Member
                    • Feb 2008
                    • 7

                    #10
                    ok i do in java... and it's work!!!

                    Comment

                    Working...