Forum Discussion
May 07, 2008
That's what the eval section of the code is supposed to do. It inserts the authentication headers in the first request (if you have a new enough version of SOAP::Lite. The issue with your code is that you are adding the headers to the $Rule object and not the $WIDEIP object that you are using.
Give this a try:
$WIDEIP = SOAP::Lite
-> uri('urn:iControl:GlobalLB/WideIP')
-> proxy("$sProtocol://$sHost:$sPort/iControl/iControlPortal.cgi");
eval { $WIDEIP->transport->http_request->header
(
'Authorization' =>
'Basic ' . MIME::Base64::encode("$sUID:$sPWD", '')
); };
-Joe