*********************************************************** use LWP::UserAgent; use LWP::Debug; use SOAP::Lite on_action => sub { "$_[0]$_[1]"; }; import SOAP::Data 'name', 'value'; our $sp_endpoint = 'http://abt.sp.xx.com/teams/Test/_vti_bin/lists.asmx'; #our $sp_domain = 'teams1.sharepoint.hp.com:80'; our $sp_domain = 'ASIAPAC'; our $sp_username = 'ASIAPAC\\XXX'; our $sp_password = 'YYY'; $debug = 1; if ($debug) { LWP::Debug::level('+'); SOAP::Lite->import(+trace => 'all'); } my @ua_args = (keep_alive => 1); my @credentials = ($sp_domain, "", $sp_username, $sp_password); my $schema_ua = LWP::UserAgent->new(@ua_args); $schema_ua->credentials(@credentials); $soap = SOAP::Lite->proxy($sp_endpoint, @ua_args, credentials => \@credentials); #$soap->schema->useragent($schema_ua); $soap->uri("http://schemas.microsoft.com/sharepoint/soap/"); $lists = $soap->GetListCollection(); quit(1, $lists->faultstring()) if defined $lists->fault(); my @result = $lists->dataof('//GetListCollectionResult/Lists/List'); foreach my $data (@result) { my $attr = $data->attr; foreach my $a qw/Title Description DefaultViewUrl Name ID WebId ItemCount/ { printf "%-16s %s\n", $a, $attr->{$a}; } print "\n"; } sub SOAP::Transport::HTTP::Client::get_basic_credentials { return ('ASIAPAC\\XXX' => 'YYY') }; *****************************************************