Create Responses and Response Attributes

The following script creates a response and response attribute. Note that GetAgentType() needs to be called to retrieve an agent type object for the call to CreateResponse():
sm1252sp1
The following script creates a response and response attribute. Note that GetAgentType() needs to be called to retrieve an agent type object for the call to CreateResponse():
use Netegrity::PolicyMgtAPI;
$policyapi = Netegrity::PolicyMgtAPI->New();
$session = $policyapi->CreateSession("adminid", "adminpwd");
$domain = $session->GetDomain("Acme North Domain");
$agenttype=$session->GetAgentType("Web Agent");
$response=$domain->CreateResponse("Welcome to Payroll",$agenttype);
if ($response==undef) {
   print "\nCouldn't create the response.";
}
else {
   $attr=$response->CreateAttribute("WebAgent-HTTP-Cookie-Variable",
                                    "cookiename=mycookie");
   if ($attr==undef) {
      print "\nCouldn't create attribute for ".$response->Name();
   }
   else {
      print "\nCreated response " . $response->Name();
      print "\nCreated attribute " . $attr->GetValue();
   }
}