Daedalus Software

Home

Technical Notes

SmoothWall Mods

Links

Daedalus Services Ltd

Registered in England and Wales No: 6273422

Registered Office:
Hillside House
2-6 Friern Park
North Finchley
London N12 9BT

Connecting to a SOAP server over HTTPS via an authenticating proxy

Using the Perl module SOAP::Lite, the following script will connect to a SOAP server over HTTPS through a proxy that requires authentication:


$ENV{HTTPS_PROXY} = 'http://proxy.whoever.com:80';
$ENV{HTTPS_PROXY_USERNAME} = 'username';
$ENV{HTTPS_PROXY_PASSWORD} = 'password';

use SOAP::Lite;
print SOAP::Lite
-> uri('http://www.soaplite.com/My/Examples')
-> proxy('https://localhost/cgi-bin/soap.cgi')
-> getStateName(21);
-> result;

N.B. Using the username:password@proxy syntax (e.g. $ENV{HTTPS_PROXY} = 'http://username:password@proxy.whoever.com:80';) does NOT work for https.