Daedalus Software

Home

Technical Notes

SmoothWall Mods

Links

Daedalus Development Ltd

Registered in England and Wales No: 8123893

Registered Office:
2nd Floor, Hathaway House
Popes Drive
London N3 1QF

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.