function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
YuvarajYuvaraj 

Perl module "WWW-Salesforce-0.082" not able to install.

Hi
 
 Please find the following steps, I have done this for installing the Plerl Module(WWW-Salesforce-0.082).
 
Kindly check the following error message.
 
=============================================================
C:\perl\lib\WWW-Salesforce-0.082>perl Makefile.PL
Several tests need to be run in order to test the Salesforce Perl module.
You MUST supply a Saleforce username and password in order to proceed.
All tests will fail if you do not provide a valid username and password.
This username and password combination is used ONLY for testing purposes.
Enter user name:  xxxxxx.xxxx@xxxx.xxx
Enter password:  xxxxxx
Writing Makefile for WWW::Salesforce
=============================================================
C:\perl\lib\WWW-Salesforce-0.082>nmake
Microsoft (R) Program Maintenance Utility   Version 1.50
Copyright (c) Microsoft Corp 1988-94. All rights reserved.
=============================================================
C:\perl\lib\WWW-Salesforce-0.082>nmake test
Microsoft (R) Program Maintenance Utility   Version 1.50
Copyright (c) Microsoft Corp 1988-94. All rights reserved.
        C:\perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'bl
ib\lib', 'blib\arch')" t/*.t
t/WWW-Salesforce....ok 1/29500 Can't locate object method "new" via package "LWP
::Protocol::https::Socket" at C:\perl\lib\WWW-Salesforce-0.082\blib\lib/WWW/Sale
sforce.pm line 468
# Looks like you planned 29 tests but only ran 1.
# Looks like your test died just after 1.
t/WWW-Salesforce....dubious
        Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 2-29
        Failed 28/29 tests, 3.45% okay
Failed Test        Stat Wstat Total Fail  List of Failed
-------------------------------------------------------------------------------
t/WWW-Salesforce.t  255 65280    29   56  2-29
Failed 1/1 test scripts. 28/29 subtests failed.
Files=1, Tests=29,  1 wallclock secs ( 0.00 cusr +  0.00 csys =  0.00 CPU)
Failed 1/1 test programs. 28/29 subtests failed.
NMAKE : fatal error U1077: 'C:\WINDOWS\system32\cmd.exe' : return code '0xff'
Stop.
C:\perl\lib\WWW-Salesforce-0.082>
=============================================================
 
Please reply me asap.
 
Thanks & Regards
C.G.Yuvaraj
 
tombohtomboh
Your LWP installation lacks the LWP::Protocol::https::Socket module, which WWW::Salesforce needs to perform HTTPS conversations with salesforce.com.

If you're building modules by hand, make sure you have OpenSSL installed and rebuild LWP.  If you use PPM, or other binary packages, you'll need to find an LWP build that supports SSL.

Tom
YuvarajYuvaraj
Thanks Tom
 
   I have re-installed the LWP and I don't have OpenSSL. So, when I am trying to install the OpenSSL received some fatel error. Please check the below message. Do I need to install all library files? which are not found in below message.
 
C:\perl\lib\OpenSSL-0.09>perl Makefile.PL
Checking if your kit is complete...
Looks good
Note (probably harmless): No library found for -lssl
Note (probably harmless): No library found for -lcrypto
Note (probably harmless): No library found for oldnames.lib
Note (probably harmless): No library found for kernel32.lib
Note (probably harmless): No library found for user32.lib
Note (probably harmless): No library found for gdi32.lib
Note (probably harmless): No library found for winspool.lib
Note (probably harmless): No library found for comdlg32.lib
Note (probably harmless): No library found for advapi32.lib
Note (probably harmless): No library found for shell32.lib
Note (probably harmless): No library found for ole32.lib
Note (probably harmless): No library found for oleaut32.lib
Note (probably harmless): No library found for netapi32.lib
Note (probably harmless): No library found for uuid.lib
Note (probably harmless): No library found for ws2_32.lib
Note (probably harmless): No library found for mpr.lib
Note (probably harmless): No library found for winmm.lib
Note (probably harmless): No library found for version.lib
Note (probably harmless): No library found for odbc32.lib
Note (probably harmless): No library found for odbccp32.lib
Note (probably harmless): No library found for msvcrt.lib
Writing Makefile for OpenSSL
C:\perl\lib\OpenSSL-0.09>
C:\perl\lib\OpenSSL-0.09>nmake
Microsoft (R) Program Maintenance Utility   Version 1.50
Copyright (c) Microsoft Corp 1988-94. All rights reserved.
cp OpenSSL/Digest.pm blib\lib/OpenSSL/Digest.pm
cp OpenSSL/PKCS7.pm blib\lib/OpenSSL/PKCS7.pm
cp OpenSSL/PKCS12.pm blib\lib/OpenSSL/PKCS12.pm
cp OpenSSL/Cipher.pm blib\lib/OpenSSL/Cipher.pm
cp OpenSSL/Name.pm blib\lib/OpenSSL/Name.pm
cp OpenSSL/RSA.pm blib\lib/OpenSSL/RSA.pm
cp OpenSSL/X509.pm blib\lib/OpenSSL/X509.pm
cp OpenSSL/Rand.pm blib\lib/OpenSSL/Rand.pm
cp OpenSSL.pm blib\lib/OpenSSL.pm
cp OpenSSL/CRL.pm blib\lib/OpenSSL/CRL.pm
cp OpenSSL/BN.pm blib\lib/OpenSSL/BN.pm
AutoSplitting blib\lib/OpenSSL/BN.pm (blib\lib\auto\OpenSSL\BN)
cp OpenSSL/HMAC.pm blib\lib/OpenSSL/HMAC.pm
        C:\perl\bin\perl.exe C:\perl\lib\ExtUtils\xsubpp  -typemap C:\perl\lib\ExtUtils\typemap -typemap typemap  OpenSSL.xs > OpenSSL.xsc && C:\perl\bin\perl.exe -MExtUtils::Command -e mv OpenSSL.xsc OpenSSL.c
        cl -c  -I.  -nologo -GF -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO
_STRICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED -DUSE_SITECUSTOMIZE -DPRIVLIB_LAST_IN_I
NC -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFI
X -MD -Zi -DNDEBUG -O1    -DVERSION=\"0.09\"  -DXS_VERSION=\"0.09\"  "-IC:\perl\
lib\CORE"   OpenSSL.c
'cl' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: 'C:\WINDOWS\system32\cmd.exe' : return code '0x1'
Stop.
C:\perl\lib\OpenSSL-0.09>
 
please reply me asap...
 
tombohtomboh
You're trying to install the OpenSSL Perl module as opposed to the OpenSSL C libraries - I should have made it clear that you need the latter for LWP to support SSL.

However, the OpenSSL Perl module build fails because you lack these libraries.

Whenever I've run on Windows, I've suffered less pain using PPMs with ActiveState's Perl than by trying to build modules myself.  If I were running on Windows at the moment, I'd be tempted to try Strawberry Perl even though it's still in its early stages.
YuvarajYuvaraj
Thanks for your prompt reply,
 
   I have checked all library files and it's all available in the program file directory. I don't know why the perl returning like "No library found for ---"?. 
 
At present I am using ActivePerl. If I install the "Strawberry Perl" in my windows machine then is it possible to avoid these kind of error?
 
please reply me asap.
 
C:\perl\lib\OpenSSL-0.09>perl Makefile.PL
Checking if your kit is complete...
Looks good
Note (probably harmless): No library found for -lssl
Note (probably harmless): No library found for -lcrypto
Note (probably harmless): No library found for oldnames.lib
Note (probably harmless): No library found for kernel32.lib
Note (probably harmless): No library found for user32.lib
Note (probably harmless): No library found for gdi32.lib
Note (probably harmless): No library found for winspool.lib
Note (probably harmless): No library found for comdlg32.lib
Note (probably harmless): No library found for advapi32.lib
Note (probably harmless): No library found for shell32.lib
Note (probably harmless): No library found for ole32.lib
Note (probably harmless): No library found for oleaut32.lib
Note (probably harmless): No library found for netapi32.lib
Note (probably harmless): No library found for uuid.lib
Note (probably harmless): No library found for ws2_32.lib
Note (probably harmless): No library found for mpr.lib
Note (probably harmless): No library found for winmm.lib
Note (probably harmless): No library found for version.lib
Note (probably harmless): No library found for odbc32.lib
Note (probably harmless): No library found for odbccp32.lib
Note (probably harmless): No library found for msvcrt.lib
Writing Makefile for OpenSSL
C:\perl\lib\OpenSSL-0.09>
 
 
tombohtomboh
If you're using ActivePerl, save yourself the hassle of building modules by hand and including C libraries.  Use PPM instead, if you can.

Additionally, you might find the following helpful:
http://perlmonks.org/?node_id=677135
YuvarajYuvaraj
Hi
 
This following code is example for connecting the Salesforce.
======================================================
C:\MyFolder_01Jan2007\perl-example>perl testcon2.pl
Try connecting to salesforce...
500 Can't locate object method "new" via package "LWP::Protocol::https::Socket"
at c:/perl/site/lib/WWW/Salesforce.pm line 468
C:\MyFolder_01Jan2007\perl-example>

I have checked two directory folders("C:\perl\lib\libwww-perl-5.808\lib\LWP\Protocol", "C:\perl\lib\LWP\Protocol"), but, in these directory, I couldn't find the "Socket". So, I think this is the reason, I am getting the above error.
I also searched the "LWP::Protocol::https::Socket" in "search.cpan.org", which is not available.
 
Where do I get this:- "LWP::Protocol::https::Socket" ?
 
SEARCH.CPAN.ORG
================
LWP::Protocol::GHTTP        
LWP::Protocol::http        
LWP::Protocol::http10        
LWP::Protocol::https        
LWP::Protocol::https10        
LWP::Protocol::loopback        
LWP::Protocol::mailto        
LWP::Protocol::nntp        
LWP::Protocol::nogo        
tombohtomboh
Read README.SSL in the LWP distribution, and re-read my previous replies if you're still stuck.
YuvarajYuvaraj
Thank You
 
Please help me regarding the usage of PPM.
 
   I read the README.SSL, in that they have mentioned regarding "libwww-perl package doesn't include
SSL functionality out-of-the-box",etc..
 
Also, these perl modules "Crypt::SSLeay, IO::Socket::SSL, Net::SSLeay" already install in my windows machine.
 
I saw some help regarding PPM installation.
 
But, could you please give me brief description about which PPM I need to use for this and usage of PPM? 
 
Here is my test connection perl code example:-
 
#! perl -w
use strict;
use WWW::Salesforce::Simple;
use SOAP::Lite;
print "Try connecting to salesforce...\n";
my $sf = WWW::Salesforce->login(username => 'xxxxxxx@xxxxx.com', password => 'xxxxxxxxxZZZZZZZZZZZ') or die $!;
print "done!\n";
my $query = "select Id, name from Opportunity";
my $result = $sf->query('query' => $query);
 foreach my $elem($result->valueof('//queryResponse/result/records')){
        print "$elem->{Id}[0], $elem->{name} \n";
        # $opID{$elem->{Id}[0]} = $elem->{OPP_ID__c};
        # $evalExp{$elem->{Id}[0]} = $elem->{EVAL_Expiration__c};
        #$licCount{$elem->{Id}[0]} = $elem->{EVAL_License_Count__c};
}
Thank you very much for your cooperation...
Regards
C.G.Yuvaraj
 


Message Edited by Yuvaraj on 04-09-2008 05:28 AM
YuvarajYuvaraj

Hi

 

Could you please any one help me regarding the above issue?

 

 I am very tired on this to check the many Perl modules, etc..

 

 

Earlier I have done the following steps:-

  1. Installed ActivePerl 5.8
  2. Installed Perl module “WWW.:Salesforece
  3. Installed Perl module “SOAP::Lite”
  4. Installed “libwww-perl-5.808”
  5. Installed “WWW” --à This was already there
  6. Installed “Carp-Clan-6.00”

 

I have followed those six steps to connect the Salesforce site. Please help me that, other than this, what I have to do?

 

If this is ok, then which PPM I have to use in my Perl code?

 

I am going to un-install the “ActivePerl” and re-installing it. So, please give me a step by step procedure to connect the Salesforce server. I will re-do the entire process once again.

 

At present I am get the following error for the above code:-

 

C:\\perl-example>perl testcon2.pl
Try connecting to salesforce...
500 Can't locate object method "new" via package "LWP::Protocol::https::Socket"
at c:/perl/site/lib/WWW/Salesforce.pm line 468

 

 

My advance thanks for your help…

 

Regards

C.G.Yuvaraj

 



Message Edited by Yuvaraj on 04-10-2008 05:00 AM
PerlPerl

Hi Yuvaraj

  Are you able to login now , If yes Could you share the knowledge with me . I am trying to login

from unix to salesfroce using perl , I am getting the error

500 Server closed connection without sending any data back at //pkgs/linux/intel/perl/5.8.8.rhas3.x86/lib/site_perl/5.8.8/WWW/Salesforce.pm line 469.

 

Can you tell me what are all the steps you did to connect to salesforce.

 

Thanks,

Prasanna

JacksonPJacksonP
I continue to struggle with this as well. Using activestate 5.8.8
 
C:\Temp\Salesforce-0.57>nmake test
Microsoft (R) Program Maintenance Utility   Version 1.50
Copyright (c) Microsoft Corp 1988-94. All rights reserved.
        C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'bl
ib\lib', 'blib\arch')" t/*.t
t/01-login..............ok 1/4LOGIN_MUST_USE_SECURITY_TOKEN: Invalid username, p
assword, security token; or user locked out. Are you at a new location? When acc
essing Salesforce--either via a desktop client or the API--from outside of your
companyΓÇÖs trusted networks, you must add a security token to your password to
log in. To receive a new security token, log in to Salesforce at http://www.sale
sforce.com and click Setup | My Personal Information | Reset Security Token. at
C:\Temp\Salesforce-0.57\blib\lib/Salesforce.pm line 58.
t/01-login..............dubious
        Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED test 4
        Failed 1/4 tests, 75.00% okay
t/02-query..............LOGIN_MUST_USE_SECURITY_TOKEN: Invalid username, passwor
d, security token; or user locked out. Are you at a new location? When accessing
 Salesforce--either via a desktop client or the API--from outside of your compan
yΓÇÖs trusted networks, you must add a security token to your password to log in
. To receive a new security token, log in to Salesforce at http://www.salesforce
.com and click Setup | My Personal Information | Reset Security Token. at C:\Tem
p\Salesforce-0.57\blib\lib/Salesforce.pm line 58.
t/02-query..............dubious
        Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-2
        Failed 2/2 tests, 0.00% okay
t/03-servertimestamp....LOGIN_MUST_USE_SECURITY_TOKEN: Invalid username, passwor
d, security token; or user locked out. Are you at a new location? When accessing
 Salesforce--either via a desktop client or the API--from outside of your compan
yΓÇÖs trusted networks, you must add a security token to your password to log in
. To receive a new security token, log in to Salesforce at http://www.salesforce
.com and click Setup | My Personal Information | Reset Security Token. at C:\Tem
p\Salesforce-0.57\blib\lib/Salesforce.pm line 58.
t/03-servertimestamp....dubious
        Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-2
        Failed 2/2 tests, 0.00% okay
t/04-crud...............LOGIN_MUST_USE_SECURITY_TOKEN: Invalid username, passwor
d, security token; or user locked out. Are you at a new location? When accessing
 Salesforce--either via a desktop client or the API--from outside of your compan
yΓÇÖs trusted networks, you must add a security token to your password to log in
. To receive a new security token, log in to Salesforce at http://www.salesforce
.com and click Setup | My Personal Information | Reset Security Token. at C:\Tem
p\Salesforce-0.57\blib\lib/Salesforce.pm line 58.
t/04-crud...............dubious
        Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-9
        Failed 9/9 tests, 0.00% okay
t/05-getupdated.........LOGIN_MUST_USE_SECURITY_TOKEN: Invalid username, passwor
d, security token; or user locked out. Are you at a new location? When accessing
 Salesforce--either via a desktop client or the API--from outside of your compan
yΓÇÖs trusted networks, you must add a security token to your password to log in
. To receive a new security token, log in to Salesforce at http://www.salesforce
.com and click Setup | My Personal Information | Reset Security Token. at C:\Tem
p\Salesforce-0.57\blib\lib/Salesforce.pm line 58.
t/05-getupdated.........dubious
        Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-5
        Failed 5/5 tests, 0.00% okay
t/06-describe...........LOGIN_MUST_USE_SECURITY_TOKEN: Invalid username, passwor
d, security token; or user locked out. Are you at a new location? When accessing
 Salesforce--either via a desktop client or the API--from outside of your compan
yΓÇÖs trusted networks, you must add a security token to your password to log in
. To receive a new security token, log in to Salesforce at http://www.salesforce
.com and click Setup | My Personal Information | Reset Security Token. at C:\Tem
p\Salesforce-0.57\blib\lib/Salesforce.pm line 58.
t/06-describe...........dubious
        Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-4
        Failed 4/4 tests, 0.00% okay
t/07-search.............LOGIN_MUST_USE_SECURITY_TOKEN: Invalid username, passwor
d, security token; or user locked out. Are you at a new location? When accessing
 Salesforce--either via a desktop client or the API--from outside of your compan
yΓÇÖs trusted networks, you must add a security token to your password to log in
. To receive a new security token, log in to Salesforce at http://www.salesforce
.com and click Setup | My Personal Information | Reset Security Token. at C:\Tem
p\Salesforce-0.57\blib\lib/Salesforce.pm line 58.
t/07-search.............dubious
        Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-3
        Failed 3/3 tests, 0.00% okay
t/08-retrieve...........LOGIN_MUST_USE_SECURITY_TOKEN: Invalid username, passwor
d, security token; or user locked out. Are you at a new location? When accessing
 Salesforce--either via a desktop client or the API--from outside of your compan
yΓÇÖs trusted networks, you must add a security token to your password to log in
. To receive a new security token, log in to Salesforce at http://www.salesforce
.com and click Setup | My Personal Information | Reset Security Token. at C:\Tem
p\Salesforce-0.57\blib\lib/Salesforce.pm line 58.
t/08-retrieve...........dubious
        Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-2
        Failed 2/2 tests, 0.00% okay
Failed Test            Stat Wstat Total Fail  Failed  List of Failed
-------------------------------------------------------------------------------
t/01-login.t            255 65280     4    2  50.00%  4
t/02-query.t            255 65280     2    4 200.00%  1-2
t/03-servertimestamp.t  255 65280     2    4 200.00%  1-2
t/04-crud.t             255 65280     9   18 200.00%  1-9
t/05-getupdated.t       255 65280     5   10 200.00%  1-5
t/06-describe.t         255 65280     4    8 200.00%  1-4
t/07-search.t           255 65280     3    6 200.00%  1-3
t/08-retrieve.t         255 65280     2    4 200.00%  1-2
Failed 8/8 test scripts, 0.00% okay. 28/31 subtests failed, 9.68% okay.
NMAKE : fatal error U1077: 'C:\WINDOWS\system32\cmd.exe' : return code '0xff'
Stop.
C:\Temp\Salesforce-0.57>
 
I have spent a lot of time making this work and it still doesn't...  might be worth the time to document the installation very closely for windows/activestate.  the crypt-ssleay PPM was perfect and easy.  How about a PPM for all of this?
 
Either way, I need to make this work pronto - can you assist?
 
Regards,
 
 
-Jackson
 
SuperfellSuperfell
LOGIN_MUST_USE_SECURITY_TOKEN, means you haven't setup the correct credentials.
JacksonPJacksonP
Thanks, note to others. You have to use a security token to get the installation to work:
(password) + (security+token) when you c:\perl makefile.pl


C:\Temp\Salesforce-0.57>nmake test

Microsoft (R) Program Maintenance Utility Version 1.50
Copyright (c) Microsoft Corp 1988-94. All rights reserved.

C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0,
ib\lib', 'blib\arch')" t/*.t
t/01-login..............ok
t/02-query..............ok
t/03-servertimestamp....ok
t/04-crud...............ok
t/05-getupdated.........ok
t/06-describe...........ok
t/07-search.............ok
t/08-retrieve...........ok
All tests successful.
Files=8, Tests=31, 40 wallclock secs ( 0.00 cusr + 0.00 csys = 0.00 CPU)

However, my code still does not work...


use WWW::Salesforce;
my $sforce = WWW::Salesforce->login( username => 'foo', password => 'bar' )
or die $!;

returns to me:
C:\Perl Files\SFDC>test.pl
Can't locate object method "login" via package "WWW::Salesforce" (perhaps you fo
rgot to load "WWW::Salesforce"?) at C:\Perl Files\SFDC\test.pl line 7.

Of course you can see that I did indeed load it above.

Thanks


jacksonp2008@gmail.com










Howev
JacksonPJacksonP
IT works. The problem with this is that the documentation is totally incorrect. of course, it wasted a bunch of my time figuring that out. I would reiterate that some accurate documentation from the salesforce folks would be very useful.

The issue with this
use WWW::Salesforce;
my $sforce = WWW::Salesforce->login( username => 'foo', password => 'bar' )
or die $!;

Is that salesforce is not part of WWW and simply cannot work. From CPAN no less:
http://search.cpan.org/~capoeirab/WWW-Salesforce-0.090/lib/WWW/Salesforce.pm

Having a little looksee at salesforce.pm

#=================================================================
#
# Copyright (C) 2003-2004 Byrne Reese (byrne at majordojo dot com)
# The Salesforce module is free software; you can redistribute
# it and/or modify it under the same terms as Perl itself.
#
#=================================================================

package Salesforce;


I find the above.

So modifying the code to read:

use Salesforce;

my $user="ineedhelp\@gmail.com";
my $pass="simpleisas3RfA44QuF7I97QlJr0KEQDV2js";

my $service = new Salesforce::SforceService;
my $port = $service->get_port_binding('Soap');
$port->login('username' => $user,'password' => $pass)
|| die "Could not login to salesforce.com";


works just great.

The www:salesforce::simple package however does not work at all as a result. I don't have time to debug that one...