perlquestion
Anonymous Monk
<p>I got the following error on my work PC, but the same code does not give any error at home, so I must have installed something there before, but I cannot remember... pls help. Thanks.</p>
<code>500 Can't locate object method "new" via package "LWP::Protocol::https::Socket"
at d.pl line 14</code>
<p>Here is the code, simple:</p>
<code>
use strict;
use warnings;
#use SampleService qw=>(:all);
#use SOAP::Lite +trace => qw(all);
use SOAP::Lite;
#$ENV{HTTPS_DEBUG} = '1';
#$ENV{HTTPS_CA_FILE} = 'C:/src/perl/a.cer';
#$ENV{HTTPS_CA_DIR} = 'C:/src/perl';
my $lite = new SOAP::Lite(
#uri => 'http://org.jboss.ws/samples/docstyle/bare',
proxy => 'https://me:password@aseriesws.somecompany.com:8443/app/services/module?wsdl');
while (1) {
my $start = time();
print"Result = " . $lite->ping()->result . ",";
my $end = time();
my $diff = $end - $start;
print " started at " . localtime() . ", took " . $diff . " seconds\n";
sleep(10);
}
</code>
-1