Sometimes, before you can manipulate an object, you must retrieve a higher-level object. That is the case with objects having domain scope.
Here is an example of creating a policy with domain scope. Note that before the policy object can be created, you retrieve the domain object where the policy will reside:
use Netegrity::PolicyMgtAPI; $policyapi = Netegrity::PolicyMgtAPI‑>New(); $session = $policyapi‑>CreateSession("adminid", "adminpwd"); $domain=$session‑>GetDomain("engineering"); $policy=$domain‑>CreatePolicy("Payroll Policy"); if($policy == undef) { print "Couldn't create the policy.\n"; } else { print "Successfully created policy " . $policy‑>Name() . ".\n"; }
Copyright © 2010 CA. All rights reserved. | Email CA about this topic |