You are here iC Home > Perl > SOAP > SOAP Basic Authorization

Perl

5.3.2 SOAP Basic Authorization

09.05.2008
5.3.1 SOAP Error Handling [  up  ] - [ a - z ] - [ search PC ] - [ top ] 5.3.3 SOAP Array

5.1   RSS 2.0
5.2   XML RPC
 5.2.1  XML::Parser
5.3   SOAP
 5.3.1  SOAP Error Handling
 5.3.2  SOAP Basic Authorization
 5.3.3  SOAP Array
 5.3.4  Google SOAP
 5.3.5  SOAP Examples
5.4   eBay API
 5.4.1  Example: get Ebay Time

You may provide required credentials on client side (user soaplite, and password authtest) overriding function get_basic_credentials() in class SOAP::Transport::HTTP::Client:

Download files/soap/auth func pl.txt
#!perl -w

# -- SOAP::Lite -- guide.soaplite.com -- Copyright (C) 2001 Paul Kulchenko --

use SOAP::Lite +autodispatch => 
  uri => 'http://www.soaplite.com/My/Examples', 
  proxy => 'http://services.soaplite.com/auth/examples.cgi', 
  on_fault => sub { my($soap, $res) = @_; 
    die ref $res ? $res->faultstring : $soap->transport->status, "\n";
  }
;

sub SOAP::Transport::HTTP::Client::get_basic_credentials { 
  return 'soaplite' => 'authtest';
}

print getStateName(21);



See also:
guide.soaplite.com/


Advanced search tips
5.3.1 SOAP Error Handling [  up  ] - [ top ] 5.3.3 SOAP Array



[ home ] - [ search ] - [ feedback ]

copyright by reto - created with mytexi