#!/usr/bin/perl use lib qw( \\crdhome\shares\TechHome\dbuild\ourperl ); use SOAP::Lite; use LWP::UserAgent; use LWP::Debug; LWP::Debug::level('+'); SOAP::Lite->import(+trace => 'all'); our $l_endpoint = 'http://localhost:8080/RelengWeb/MachineActivityWSPort'; our $l_domain = 'DOMAIN'; our $l_username = 'DOMAIN\\user'; our $l_password = 'userPassword'; my @ua_args = (keep_alive => 1); my @credentials = ($l_domain, "", $l_username, $l_password); my $schema_ua = LWP::UserAgent->new(@ua_args); $schema_ua->credentials(@credentials); print "\nBuilding proxy\n\n"; $soap = SOAP::Lite->proxy($l_endpoint, @ua_args, credentials => \@credentials); print "\nSetting URI\n\n"; $soap->uri("$l_endpoint"); print "\nSetting user agent\n\n"; $soap->useragent($schema_ua); print "\nTrying to connect to MachineActivity Port\n\n"; my $service = $soap->service("$l_endpoint" . "?wsdl"); print 'Successfully connected.'; sub SOAP::Transport::HTTP::Client::get_basic_credentials { return ('user' => 'password') };