You need to sign in to do that
Don't have an account?
trouble getting started with Perl WWW::Salesforce::Simple
#!/usr/bin/perl use WWW::Salesforce::Simple ; my $sforce = WWW::Salesforce::Simple->new( username => 'user@domain.com', password => 'pas$w@rd!' ); print "Connection result: $sforce\n" ;
I'm unable to get the basic code above to work. When I run it, either on Linux or on Windows, I get the following message:
Incorrect parameter at /path/to/perl5/lib/perl5/SOAP/Lite.pm line 1993
I'm using EPIC to debug. The failure is occuring at line 482 of Salesforce.pm:
$self->{'sf_sid'} = $r->valueof('//loginResponse/result/sessionId');
My debugger shows that there is a value for //loginResponse/result/sessionId. The valueof function is calling the match method which is calling the _traverse method. _traverse is recursive, but line 1993 of Lite.pm prevents the recursion tree from gong more than 10 levels deep, which is where my code dies out.
I can't, however, quite follow the logic of the _traverse function. Is there a bug there?
This is a known issue (https://rt.cpan.org/Public/Bug/Display.html?id=78692) exhibited in the most recent version (0.715) of the SOAP Lite perl module which Salesforce Simple has a dependency. Rather than modifying the source code of the Salesforce Simple module, a better option would be to downgrade to the previous SOAP Lite module version (0.714).
All Answers
Still have not figured anything out. Emailed Fred Moyer. Found out that if I dig into the data structure of the response object directly I can replace the valueof calls and at least get my data and get going with my development, but I'm a little worried about future module upgrades that might change the data structure.
I'm having the exact same issue, but haven't been able to login yet.
Is there any known fix for this, or has WWW::Salesforce been abandoned?
dan shahin
My interim solution has been to replace all instances of
with
In Salesforce.pm and Salesforce/Simple.pm.
That's kludgy, but it works.
Have not heard back from Fred.
I patched SOAP/Lite.pm line 1993 from:
die "Incorrect parameter" unless $itself =~/^\d$/;
to
die "Incorrect parameter" unless $itself =~/^\d+$/;
This is a known issue (https://rt.cpan.org/Public/Bug/Display.html?id=78692) exhibited in the most recent version (0.715) of the SOAP Lite perl module which Salesforce Simple has a dependency. Rather than modifying the source code of the Salesforce Simple module, a better option would be to downgrade to the previous SOAP Lite module version (0.714).