Here is how I do it:
#!/usr/bin/perl -w
use strict;
use WWW::Mechanize;
require IO::Socket::SSL;
my $mech = WWW::Mechanize->new();
$mech->get('https://www.amazon.com');
Regards,
Rich Duzenbury
IT Department
Brokers International, Ltd.
1200 E. Main
Panora, IA 50216
(800) 362-1097 ext 1401
________________________________
From: Tran, Stephanie [mailto:Stephanie.Tran@xxxxxxx]
Sent: Thursday, January 25, 2007 10:29 PM
To: libwww@xxxxxxxx
Subject: Desperate for help with Crypt::SSLeay SSL
First, I am not a Perl programmer or very familiar with the AIX
operating system. I have been asked to develop a Web Service Client to
send a request to a Websphere Java Web Service provider. The Web Service
provider is SSL. I have attached my code. I have also included
the versions of libraries that our server team has installed for me at
the bottom of this email. I performed a perl -V so that you can see our
perl settings. I am receiving the following error:
Any help would be deeply appreciated.
------------------------------------------------------------------------
--------------------------------------------------
perl -W ssl011407t1.pl
Subroutine SOAP::Trace::transport redefined at
/usr/opt/perl5/lib/site_perl/5.8.
0/SOAP/Lite.pm line 2650.
Subroutine SOAP::Trace::dispatch redefined at
/usr/opt/perl5/lib/site_perl/5.8.0
/SOAP/Lite.pm line 2650.
Subroutine SOAP::Trace::result redefined at
/usr/opt/perl5/lib/site_perl/5.8.0/S
OAP/Lite.pm line 2650.
Subroutine SOAP::Trace::parameters redefined at
/usr/opt/perl5/lib/site_perl/5.8
.0/SOAP/Lite.pm line 2650.
Subroutine SOAP::Trace::headers redefined at
/usr/opt/perl5/lib/site_perl/5.8.0/
SOAP/Lite.pm line 2650.
Subroutine SOAP::Trace::objects redefined at
/usr/opt/perl5/lib/site_perl/5.8.0/
SOAP/Lite.pm line 2650.
Subroutine SOAP::Trace::method redefined at
/usr/opt/perl5/lib/site_perl/5.8.0/S
OAP/Lite.pm line 2650.
Subroutine SOAP::Trace::fault redefined at
/usr/opt/perl5/lib/site_perl/5.8.0/SO
AP/Lite.pm line 2650.
Subroutine SOAP::Trace::freeform redefined at
/usr/opt/perl5/lib/site_perl/5.8.0
/SOAP/Lite.pm line 2650.
Subroutine SOAP::Trace::trace redefined at
/usr/opt/perl5/lib/site_perl/5.8.0/SO
AP/Lite.pm line 2650.
Subroutine SOAP::Trace::debug redefined at
/usr/opt/perl5/lib/site_perl/5.8.0/SO
AP/Lite.pm line 2650.
SOAP::Data::new: ()
SOAP::Transport::new: ()
SOAP::Serializer::new: ()
SOAP::Deserializer::new: ()
SOAP::Parser::new: ()
SOAP::Lite::new: ()
Subroutine LWP::UserAgent::redirect_ok redefined at
/usr/opt/perl5/lib/site_perl/5.8.0/SOAP/Transport/HTTP.pm line 40.
Subroutine LWP::Protocol::collect redefined at
/usr/opt/perl5/lib/site_perl/5.8.0/SOAP/Transport/HTTP.pm line 50.
Subroutine SOAP::Transport::HTTP::Client::patch redefined at
/usr/opt/perl5/lib/site_perl/5.8.0/SOAP/Transport/HTTP.pm line 52.
SOAP::Transport::HTTP::Client::new: ()
SOAP::Data::new: ()
SOAP::Lite::call: ()
SOAP::Serializer::envelope: ()
SOAP::Serializer::envelope: SOAP::Data=HASH(0x203e9b4c)
SOAP::Data::new: ()
SOAP::Data::new: ()
SOAP::Data::new: ()
SOAP::Transport::HTTP::Client::send_receive:
HTTP::Request=HASH(0x202d5360)
SOAP::Transport::HTTP::Client::send_receive: POST
https://IBM-SOZGIG1GH90.us.ad.lfg.com/ssl/services/sslSOAP HTTP/1.1
Accept: text/xml
Accept: multipart/*
Accept: application/soap
Content-Length: 402
Content-Type: text/xml; charset=utf-8
SOAPAction: "https://ssl.com:9443/ssl/NewOperation"
<?xml version="1.0" encoding="UTF-8"?><soap:Envelope
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:x
sd="http://www.w3.org/2001/XMLSchema"
xmlns:tns="https://ssl.com:9443/ssl/"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><NewOp
erationReque
st xmlns="https://ssl.com:9443/ssl/" xsi:nil="true"
/></soap:Body></soap:Envelope>
SOAP::Transport::HTTP::Client::send_receive:
HTTP::Response=HASH(0x2050d18c)
SOAP::Transport::HTTP::Client::send_receive: 501 Protocol scheme
'https' is notsupported (Crypt::SSLeay not installed)
Content-Type: text/plain
Client-Date: Fri, 26 Jan 2007 04:21:28 GMT
Client-Warning: Internal response
LWP will support https URLs if the Crypt::SSLeay module is
installed.
More information at
<http://www.linpro.no/lwp/libwww-perl/README.SSL>.
SOAP::Transport::HTTP::Client::send_receive:
HTTP::Request=HASH(0x202d5360)
SOAP::Transport::HTTP::Client::send_receive: POST
https://IBM-SOZGIG1GH90.us.ad.lfg.com/ssl/services/sslSOAP HTTP/1.1
Accept: text/xml
Accept: multipart/*
Accept: application/soap
User-Agent: SOAP::Lite/Perl/0.68
Content-Length: 402
Content-Type: text/xml; charset=utf-8
0828-SOAPAction: "https://ssl.com:9443/ssl/NewOperation"
Man: "http://schemas.xmlsoap.org/soap/envelope/"; ns=0828
SOAPAction: "https://ssl.com:9443/ssl/NewOperation"
<?xml version="1.0" encoding="UTF-8"?><soap:Envelope
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:tns="https://ssl.com:9443/ssl/"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><NewOp
erationRequest xmlns="https://ssl.com:9443/ssl/" xsi:nil="true"
/></soap:Body></soap:Envelope>
SOAP::Transport::HTTP::Client::send_receive:
HTTP::Response=HASH(0x20510b88)
SOAP::Transport::HTTP::Client::send_receive: 500 Can't locate
object method "new" via package "LWP::Protocol::https::Socket"
Content-Type: text/plain
Client-Date: Fri, 26 Jan 2007 04:21:28 GMT
Client-Warning: Internal response
500 Can't locate object method "new" via package
"LWP::Protocol::https::Socket"
SOAP::Deserializer::deserialize: ()
SOAP::Parser::decode: ()
500 Can't locate object method "new" via package
"LWP::Protocol::https::Socket" at ssl011407t1.pl line 6
SOAP::Data::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Lite::DESTROY: ()
SOAP::Deserializer::DESTROY: ()
SOAP::Parser::DESTROY: ()
SOAP::Transport::DESTROY: ()
SOAP::Transport::HTTP::Client::DESTROY: ()
SOAP::Serializer::DESTROY: ()
SOAP::Data::DESTROY: ()
SOAP::Data::DESTROY: ()
------------------------------------------------------------------------
------------------------------------------------------------------------
----------------------------------------------------------
This is libwww-perl-5.805
Class::Singleton -- 1.03
Compress::Raw::Zlib -- 2.003
Compress::Zlib -- 2.003
Crypt::OpenSSL::RSA -- 0.23
Crypt::OpenSSL::Random -- 0.03
Crypt::OpenSSL::X509 -- 0.3.1
Crypt::SSLeay -- 0.53
DateTime -- 0.35
DateTime::Format::Epoch -- 0.10
DateTime::Format::W3CDTF -- 0.04
DateTime::Locale -- 0.3101
DateTime::TimeZone -- 0.54
Digest -- 1.15
Digest::SHA1 -- 2.11
Digest::SHA::PurePerl -- 5.32
ExtUtils::CBuilder -- 0.18
ExtUtils::ParseXS -- 2.16
FCGI::Async -- 0.07
FCGI::ProcManager -- 0.17
HTTP::Daemon::SSL -- 1.02
IO -- 1.23
IO::Compress::Base -- 2.003
IO::Compress::Zlib -- ???
IO::Socket::SSL -- 1.01
IO::String -- 1.08
IO::Zlib -- 1.04
LWP -- 5.805
MIME-tools -- ???
MIME::Base64 -- 3.07
Mail -- ???
Module::Build -- 0.2805
Net -- ???
Params::Validate -- 0.86
Perl -- 5.8.0
Pod -- ???
Pod::Escapes -- 1.04
Pod::Simple -- 3.04
SOAP::Lite -- 0.68
Sys::Hostname::Long -- 1.4
URI -- 1.35
WSRF::Lite -- 0.6
XML-DOM -- ???
XML::CanonicalizeXML -- 0.03
XML::Parser -- 2.34
XML::RegExp -- 0.02
libxml-perl -- ???
------------------------------------------------------------------------
------------------------------------------------------------------------
----------------------------------------------------------
perl -V
Summary of my perl5 (revision 5.0 version 8 subversion 0)
configuration:
Platform:
osname=aix, osvers=5.2.0.0, archname=aix-thread-multi
uname='aix rocky 2 5 000ad7df4c00 '
config_args=''
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
useperlio=define d_sfio=undef uselargefiles=define
usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc_r', ccflags ='-D_ALL_SOURCE -D_ANSI_C_SOURCE
-D_POSIX_SOURCE -qmaxmem=16384 -qnoansialias -DUSE_NATIVE_DLOPEN
-DNEED_PTHREAD_INIT -q32 -D_LARGE_FILES -qlonglong',
optimize='-O',
cppflags='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE
-qmaxmem=16384 -qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT'
ccversion='', gccversion='', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8,
byteorder=4321
d_longlong=define, longlongsize=8, d_longdbl=define,
longdblsize=8
ivtype='long', ivsize=4, nvtype='double', nvsize=8,
Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='ld', ldflags =' -brtl -b32'
libpth=/lib /usr/lib /usr/ccs/lib
libs=-lbind -lnsl -ldbm -ldl -lld -lm -lpthreads -lc_r
-lcrypt -lbsd -lPW
perllibs=-lbind -lnsl -ldl -lld -lm -lpthreads -lc_r -lcrypt
-lbsd -lPW
libc=/lib/libc.a, so=a, useshrplib=true, libperl=libperl.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_aix.xs, dlext=so, d_dlsymun=undef, ccdlflags='
-bE:/usr/opt/perl5/lib/5.8.0/aix-thread-multi/CORE/perl.exp'
cccdlflags=' ', lddlflags='-bhalt:4 -bM:SRE
-bI:$(PERL_INC)/perl.exp -bE:$(BASEEXT).exp -bnoentry -lpthreads -lc_r'
Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY USE_ITHREADS
USE_LARGE_FILES PERL_IMPLICIT_
CONTEXT
Built under aix
Compiled at Jul 26 2002 13:48:15
@INC:
/usr/opt/perl5/lib/5.8.0/aix-thread-multi
/usr/opt/perl5/lib/5.8.0
/usr/opt/perl5/lib/site_perl/5.8.0/aix-thread-multi
/usr/opt/perl5/lib/site_perl/5.8.0
/usr/opt/perl5/lib/site_perl
.
Thank you,
Stephanie Tran
IBM I/T Specialist
stephanietran@xxxxxxxxxx
stephanie.tran@xxxxxxx
Office: 260-455-0607
Mobile: 260-450-4271
Notice of Confidentiality:
**This E-mail and any of its attachments may contain
Lincoln National Corporation proprietary information, which is
privileged,
confidential, or subject to copyright belonging to the
Lincoln National Corporation family of companies. This E-mail is
intended
solely for the use of the individual or entity to which it is
addressed.
If you are not the intended recipient of this E-mail, you are
hereby
notified that any dissemination, distribution, copying, or
action taken
in relation to the contents of and attachments to this E-mail is
strictly
prohibited and may be unlawful. If you have received this E-mail
in error,
please notify the sender immediately and permanently delete the
original
and any copy of this E-mail and any printout. Thank You.**
|