To run a simple Perl script to print out all the agent names.
#Initialize the Policy Management API use Netegrity::PolicyMgtAPI; $policyapi = Netegrity::PolicyMgtAPI->New(); print "Step 1. Log in the admin and create an API session.\n"; $session = $policyapi->CreateSession("username", "password"); @agents = $session‑>GetAllAgents(); foreach $agent (@agents) { print "Agent Name = " . $agent‑>Name() . "\n"; } and the following have been loaded in my env variables: PERL5LIB=/opt/sm6/siteminder12/CA/CLI/lib/site_perl/5.8.4/sun4-solaris-thread-multi LD_LIBRARY_PATH=/opt/sm6/siteminder12/CA/CLI/lib:/opt/sm6/siteminder12.x/CA/lib PATH=/usr/bin::/opt/sm6/siteminder12/CA/CLI/bin/
However, when I run the script using the built-in perl: I get the following error: /opt/sm6/siteminder12/CA/CLI/bin/perl Test.pl Can't load '/opt/sm6/siteminder12/CA/CLI/lib/site_perl/5.8.4/sun4-solaris-thread-multi/auto/Netegrity/PolicyMgtAPI/PolicyMgtAPI.so' for module Netegrity::PolicyMgtAPI: ld.so.1: perl: fatal: libjvm.so: open failed: No such file or directory at /opt/sm6/siteminder12/CA/CLI/lib/5.8.4/sun4-solaris-thread-multi/XSLoader.pm line 68. at Test.pl line 3 Compilation failed in require at Test.pl line 3. BEGIN failed--compilation aborted at Test.pl line 3.
Need to source ca_ps_env.ksh
From the siteminder home directory, run following;
source ca_ps_env.ksh