SOAP-WSDL - Basic Auth Issue SOAP-WSDL-2.00_32

Posted on Sun Mar 9 06:19:21 2008 by jrupard
Basic Auth Issue SOAP-WSDL-2.00_32
I'm having an issue with basic authentication and SOAP-WSDL-2.00_32. The transport is not sending the WWW-Authenticate header (or a correct one)..

The following code returns a 401 error in $result;
use warnings; use lib 'wsdl-lib/'; use MyInterfaces::DOperations::DOperationsSoap; my $user ='xxxx'; my $password = 'yyy'; *SOAP::Transport::HTTP::get_basic_credentials = sub { return ($user, $password); }; my $dws = MyInterfaces::DOperations::DOperationsSoap->new(); my $result = $dws->Enum({ server => { Ip => '192.168.0.2'}}); die $result->get_faultstring()->get_value() if not ($result);

I'm using similar code with a SOAP::Lite client using basic auth, same user and password and it works fine.

Where am I going wrong here?

Thanks,
Jason
Direct Responses: 7298 | Write a response