skunix has asked for the wisdom of the Perl Monks concerning the following question:
Solved!
I'm not sure why the syntax below doesn't work but to fix it I put the username and password in the proxy URL like so...
I am trying to use SOAP::Lite to connect to a SOAP api that requires HTTP auth but I can't seem to get it to work and I have no idea how to debug this!
This is what I'm trying to do...
#!/usr/bin/perl use strict; use SOAP::Lite; my $soap = SOAP::Lite->new( proxy => [ 'https://<host>:<port>/<path>', 'credentails' => [ '<host>:<port>', # host:port 'My Realm', # realm 'username', 'password' ] ] ); my $som = $soap->RetrieveList(); die $som->faultstring if ($som->fault); print $som->results, "\n";
This is what I get for output...
401 Unauthorized at test.pl line 25.
The documentation, if you can call it that, for SOAP::Lite has been of no help. Anyone know what I am doing wrong?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: SOAP::Lite - 401 Unauthorized
by poj (Abbot) on Jul 23, 2013 at 20:47 UTC | |
by skunix (Novice) on Jul 24, 2013 at 14:55 UTC | |
|
Re: SOAP::Lite - 401 Unauthorized
by Loops (Curate) on Jul 23, 2013 at 19:57 UTC | |
|
Re: SOAP::Lite - 401 Unauthorized
by vsespb (Chaplain) on Jul 23, 2013 at 23:36 UTC | |
by skunix (Novice) on Jul 24, 2013 at 15:41 UTC |