use SOAP::Lite;
my $client = SOAP::Lite
->uri('http://localhost/Service')
->proxy('http://localhost/web-service');
my $auth = $client->login( 'username', 'password' );
exit 1 if $auth->fault != 0;
my $header = SOAP::Header->name( 'auth' => $auth->result );
my $response = $client->private_method( $header );
####
use SOAP::Lite;
my $client = SOAP::Lite
->service('http://localhost/Service.wsdl');
my $auth = $client->login( 'username', 'password' );
exit 1 if $auth->fault != 0;
my $header = SOAP::Header->name( 'auth' => $auth->result );
my $response = $client->private_method( $header );
####
aeee24d36fc6107947b0d7b5af8aff41