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

How to authenticate when using WSDL

Expand Messages
  • Eric Jain
    Direct call, username and password embedded in url: my $endpoint = http://user:pass@localhost/axis/servlet/AxisServlet ; my $service =
    Message 1 of 1 , Aug 13, 2002
    • 0 Attachment
      Direct call, username and password embedded in url:

      my $endpoint = 'http://user:pass@localhost/axis/servlet/AxisServlet';
      my $service = SOAP::Lite->proxy($endpoint)->uri("counter");
      my $response = $service->count();


      Call with help of WSDL, now where do I put the username and password?

      my $service = SOAP::Lite->service('file:/service.wsdl');
      my $result = $service->count();


      As the documentation suggests, I tried adding a the following method
      (ugly...), but without seeing any effects (no Authorization entry in HTTP
      header):

      sub SOAP::Transport::HTTP::Client::get_basic_credentials {
      return 'user' => 'pass';
      }


      Any ideas? Ideally I would expect something like:

      $service->user('user');
      $service->password('pass');


      --
      Eric Jain
    Your message has been successfully submitted and would be delivered to recipients shortly.