Thursday, 22 December 2011

Perl: SOAP::Lite - 500 Can't connect to webservice.service.com:443 (Invalid argument) https


I had a problem recently with trying to call a HTTPS Web Service using Perl's SOAP::Lite library, and I was receiving this error:
"500 Can't connect to webservice.service.com:443 (Invalid argument)"...

Note: Port 443 ssl. This is the default port for HTTPS/SSL. This is the encrypted form of HTTP that normally runs over port 80.

Okay, so problem identified... Cannot communicate with service over 443... What next?

We use cpan to install another library called "Crypt::SSLeay"... sounds spooky! But don't worry, it simply provides support for the HTTPS protocol in LWP (Library for WWW in Perl).

cpan - what the heck? View my previous post on cpan here

Simply issue this command, and cpan will do the rest...
Code Snippet
  1. sudo perl -MCPAN -e "install Crypt::SSLeay"
End of Code Snippet

No comments: