Hi All,
Wondering if anyone has had any success with achieving the following. I am trying to retrieve and programmatically modify an existing Response Attribute value. Things I am able to do successfully currently are:
result = policyapi.getDomainObjectNames("Responses", domain, responseVector);
This will populate the response Vector with the current responses for the specified domain.
I can also then bring back either a Map or a Vector containing the "Response Attributes"
result = policyapi.getResponseAttrs(response, domain, responseMap);
result = policyapi.getResponseAttrs(response, domain, responseAttrVector);
My issue is when trying to create a SmResponseAttr object using the constructor
SmResponseAttr(java.lang.String value)
Here is the attribute list of the response on the AdminUI
My attempts are like this:
SmResponseAttr myAttr = new SmResponseAttr("Test=<% userattr=\"TestBlah\" %>);
-note the java.util.string wants to escape the " character
or
SmResposneAttr myAttr = new SmResponseAttr(https://oel3.rusniaklab.com/sendmehere.html");
The Java Doc state the value needs to be in the format:
public SmResponseAttr(java.lang.String value)
- Constructs a Response attribute object with the specified response attribute type.
- Parameters:
value
- Contains a response attribute type in one of the following formats:
Note: The non-alphanumeric characters in the format examples are required characters.- Static A string that is part of a SiteMinder response, in the following format:
variable-name=variable-value
In the example, variable-name is the name for the name/value pair that this response attribute will return to the Web Agent. variable-value is the static text that will be returned as the second half of the name/value pair. - User Attribute A string containing profile information from a user's entry in a user directory, in the following format:
User-Attribute-variable-name=<%userattr= "user-attribute-name"%>
.
In the example, User-Attribute-variable-name is the name for the name/value pair that this response attribute will return to the Web Agent. user-attribute-name is a user attribute that can be retrieved from an LDAP, WinNT, or ODBC user directory. - DN Attribute A string containing profile information from a directory object in an LDAP or ODBC user directory, in the following format:
DN-Variable-Name=<#dn="DN-Spec" attr= "DN-Attribute-Name"#>
In the example, DN-Variable-Name is the name for the name/value pair that this response attribute will return to the Web Agent. DN-Spec is the distinguished name of the user group that you want to retrieve the user attribute from. DN-Attribute-Name is an attribute associated with an LDAP or ODBC directory object to which the user is related, such as a group or an organizational unit (OU). - Active Response An active expression associated with the response attribute. The expression is a string of variable definitions in the following format:
"varName"=<@lib="LibName" func="FuncName" param="Param"@>
In the example, "varName" is the name for the name/value pair that this response attribute will return to the Web Agent. "LibName" is the name of the shared library that supports the active response. "FuncName" is the name of the function in the shared library that implements the active response. "Param" is an optional list of parameters to be passed to the function in the shared library.
Has anyone had luck with creating a response attr object from an existing one?
Thanks for your time,
Adam Rusniak