HI all,
I configure a datacapture.cfg to use "inline command" to call a perl .ipl file that will connect to a ldap to retrieve the name of the user based on UID. however, i encounter a error when doing a new DCR :
Templating Error Page
A MessageException was thrown: Error building the requirements: IO:

ocket::INET: Cannot determine protocol at C:\iw-home\iw-perl\site\lib/Net/LDAP.pm line 81 IO:

ocket::INET: Cannot determine protocol at /iw-home/httpd/iw-bin/script.ipl line 5
When I execute the .ipl at the command prompt using iwperl.exe, there is no problem at all .
Below is content of the script.ipl that I used:
#!/iw-home/iw-perl/bin/iwperl.exe -w
use strict;
use Net::LDAP;
my $ldap = Net::LDAP->new('10.200.26.26',debug=>0, timeout=>5) or die "$@";
#LDAP search filter that lists all the entries for "Users"
my $mesg = $ldap->search ( # perform a search
base => "o=ABC",
scope => "1",
filter => "objectclass=*"
);
my $max = $mesg->count;
for(my $i = 0 ; $i < $max ; $i++) {
my $entry = $mesg->entry($i);
foreach my $attr ($entry->attributes) {
print join("\n ",$attr, $entry->get($attr)),"\n";
}
}
$ldap->unbind; # take down session
Any help would be appreciated. Thank you.
Regards,
Kim.