« What is ACH? | Main | LogMeIn & Error Code 4320 »

August 18, 2006

Errors Running SOAP::Lite with https

The last few days I've been trying to figure out why my perl script using the SOAP::Lite module keeps dying when I call https (SSL Encryption), but it works flawlessly when using plain http.  The uninformative error message I received when my perl script dies is listed below:

500 Can't locate object method "new" via package "LWP::Protocol::https::Socket"

I must admit I wasted a good bit of time following the poor links return from a Google search on this error message.  Most of the links were nothing more than a web page filled with error messages along with some marketing banner ads.  No solutions, no luck.

After numerous searches on multiple search engines, I *finally* came across the relevant information, which I will post below so I will never have to go through this again. Grin.

If you are running Active State's Perl 5.8.X release on windows and need to use an https call with SOAP::Lite, the links below should help you get on your way.

1)  Link to Active State's Web page stating that they will distribute the SSL modules with perl, but will provide different repositories.

    http://aspn.activestate.com/ASPN/Downloads/ActivePerl/PPM/Repository

The Canadian Federal Government requires that companies and organizations that wish to distribute cryptographic software get a permit in order to do so. ActiveState does not have this permission.

....

The two popular crypto modules Crypt-SSLeay and Net_SSLeay can be found in other repositories, and can be installed using PPM as follows:

    ppm install http://theoryx5.uwinnipeg.ca/ppms/Crypt-SSLeay.ppd

The above command installs the Perl 5.8 PPM of Crypt-SSLeay from the University of Winnipeg's PPM repositories. For the Perl 5.6 PPM, use the following command:

    ppm install http://theoryx5.uwinnipeg.ca/ppmpackages/Crypt-SSLeay.ppd

2)  PPM command to fetch Crypt-SSLeay.ppd for Active State Perl 5.8

    ppm install http://theoryx5.uwinnipeg.ca/ppms/Crypt-SSLeay.ppd

   

3)  Excellent write up on how to use Active State's PPM utility from Perl Monks.

    http://perlmonks.org/?node_id=434813

    I found this link above by reading a question about Installing Net::SSLeay on Windows XP

4)  Link to the Win32 SSL dll file, which needs to be installed into your path, probably C:\perl\bin\

      http://theoryx5.uwinnipeg.ca/ppms/scripts/ssleay32.dll

So the short answer is open up your command prompt and run the following command.

   

ppm install http://theoryx5.uwinnipeg.ca/ppms/Crypt-SSLeay.ppd

timtowtdi

 

-Chris

   

Posted at 04:03 PM in Software | Permalink

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/t/trackback/124876/5725580

Listed below are links to weblogs that reference Errors Running SOAP::Lite with https:

Comments

Many thanks.
First hit on google delivered the exact answer I was looking for.

regards
Thomas

Posted by: thomas | Sep 29, 2006 6:09:08 AM

===
Many thanks.
First hit on google delivered the exact answer I was looking for.

regards
Thomas
===

Ditto.
Thank you very very much. :)
Just came accross that error, found this page after maybe 10 mins. If it wasn't for this concise info, I don't doubt I could have spent a very unlucky few hours scouring the web. Only the second hurdle to overcome in implementing a powerful SOAP WSDL file! The first was when it thought the 'C:' in 'C:\Directory\Subdir\file.wsdl' meant I wanted to use a PROTOCOL called C! :P
then replacing with '\Directo..' made it think the URL wasn't absolute, so had to make it 'file:/Direc...' (Dev machine. Production is *nix)

tx muchly.

Posted by: Jared Pritchard | Jun 5, 2007 2:46:05 AM

thanks for finding all the info... very helpful.

Posted by: Virgil | Jun 28, 2007 1:10:31 PM

Thanks very much, worked like a charm!

Note: this tip is not restricted to SOAP::Lite, many (all?) modules use LWP to fetch pages so anyone trying to fetch SSL pages with Activestate Perl will need to do this.

Posted by: Jim | Dec 2, 2007 2:49:32 PM

Post a comment