Loading ...
Sorry, an error occurred while loading the content.

make sure get_basic_credentials is called in a subclass

Expand Messages
  • Srinivas Vippagunta
    Hello, I am trying to make sure, when the invoke() method in the subclass(package B) is called that the get_basic_credentials from the super class(package A)
    Message 1 of 1 , Apr 22 12:32 PM
    • 0 Attachment
      Hello,
      I am trying to make sure, when the invoke() method in the subclass(package B) is called that the get_basic_credentials from the super class(package A) is automatically invoked. SOAP::Lite, I think under the covers uses LWP and it calls get_basic_credentials. Because, I dont explicitly call the get_basic_credentials, I am not sure how to do that. Any help is appreciated.

      thanks,
      srinivas.

      Package A;
      Use Exporter;
      our @ISA = qw(Exporter);
      use SOAP::Lite;

      Sub new {
      Returns the blessed obj. ref.
      }

      Sub invoke{
      Does some stuff here
      }

      sub SOAP::Transport::HTTP::Client::get_basic_credentials {
      return $user => $passwd;
      }
      1;

      Package B;
      Use Exporter;
      our @ISA = qw(Exporter A);
      use SOAP::Lite;

      Sub new {
      Add some more variables to the parent obj ref
      }

      Sub invoke{
      my $s = SOAP::Lite
      -> uri($self->{uri})
      -> proxy($self->{proxy});
      $s->call($method);
      }
    Your message has been successfully submitted and would be delivered to recipients shortly.