Policy configuration properties for all policies
Use the attributes parameter with the setPolicyType and setBinding commands to specify various properties for each quality of service (QoS) within a policy set. Use the properties in this topic with each QoS within application and system policy sets.
Use the following commands and parameters in the PolicySetManagement group of AdminTask to customize the policy set configuration.
- Use the attributes parameter for the getPolicyType and getBinding commands to view the properties for the policy and binding configuration. To get an attribute, pass the property name to the getPolicyType or getBinding command.
- Use the attributes parameter for the setPolicyType and setBinding commands to add, update, or remove properties from the policy and binding configurations. To add or update an attribute, specify the property name and value. The setPolicyType and setBinding commands update the value if the attribute exists, or adds the attribute and value if the attribute does not exist. To remove an attribute, specify the value as an empty string (""). The attributes parameter accepts a properties object.
If a property name or value supplied with the attributes parameter is not valid, then the setPolicyType and setBinding commands fail with an exception. The property not valid is logged as an error or warning in SystemOut.log. However, the command exception might not contain the detailed information for the property that caused the exception. When the setPolicyType and setBinding commands fail, examine SystemOut.log for any error and warning messages that indicate that the input for the attributes parameter contains one or multiple properties that are not valid.
Before you use the commands in this topic, verify that we are using the most recent version of wsadmin. The policy set management commands that accept a properties object as the value for the attributes or bindingLocation parameters are not supported on previous versions of wsadmin. For example, the commands do not run on a V6.1.0.x node.
Attributes to configure for all QoS policies
Use the following list of attributes to configure attributes across all QoS policies using Jython and wsadmin:
- enabled
- Specifies whether the policy type is enabled or disabled.
The following example provides the format to enter the attributes parameter:
-attributes "[[enabled true]]"- provides
- Provides a description for the configuration.
The following example provides the format to enter the attributes parameter:
-attributes "[[provides [Messaging Security]]]"
The following example uses the setPolicyType command to set the enabled and provides properties for the myCustomSecurityPS custom policy set, which contains a ReliableMessaging policy:
AdminTask.setPolicyType('[-policySet myCustomSecurityPS -policyType WSReliableMessaging -attributes [[enabled true][provides [Messaging security]]]]')
Related concepts
Web services policies
Related tasks
Set application and system policy sets for Web services using scripting
Set a WS-Transaction policy set using wsadmin
Related
PolicySetManagement
WSSecurity policy and binding properties
WSAddressing policy and binding properties
SSLTransport policy and binding properties
HTTPTransport policy and binding properties
WSReliableMessaging policy and binding properties