my $lite = SOAP::Lite->new()->on_action(sub { join '/', @_ } ) ->proxy($args->{proxy}); my $response = $lite->call( SOAP::Data->name('fetchAndLock') ->attr({ 'xmlns', $args->{xmlns}}), SOAP::Data->name("first")->value($args->{first}), SOAP::Data->name("max")->value($args->{max}), SOAP::Data->name("action")->value($args->action}), SOAP::Data->name("state")->value($args->{state}), ); return $response; } sub SOAP::Transport::HTTP::Client::get_basic_credentials { $zID => $zPW; }
Where $zID and $zPW were defined higher up in the code. When I run the script, I receive the following error:
SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 401
Unauthorized
Connection: close
Date: Wed, 29 Aug 2012 14:16:22 GMT
Server: IBM_HTTP_Server
Content-Language: en-US
Content-Type: text/xml; charset=UTF-8
Client-Date: Wed, 29 Aug 2012 14:16:22 GMT
Client-Peer: 169.81.175.20:80
Client-Response-Num: 1
Client-Transfer-Encoding: chunked
Client-Warning: Missing Authenticate header
I tried putting the "get_basic_credentials" line just after the "my $line = SOAP..." line, but the error is the same.
where am I going wrong? Any help/advice/suggestions/etc... are much appreciated.
Thanks
Frank
In reply to Re^2: soap::lite and authorization
by fritz1968
in thread soap::lite and authorization
by fritz1968
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |