WebSphere Application Server Version 6.1 Feature Pack for Web Services
             Operating Systems: AIX, HP-UX, i5/OS, Linux, Solaris, Windows, z/OS

             Personalize the table of contents and search results
             New or updated topic for this feature pack

Configuring application-specific and system bindings using the wsadmin tool

Use the Jython or Jacl scripting language to edit custom application bindings and system bindings for policies to match your installation environment or system requirements.

Before you begin

Before you use the commands in this topic, verify that you are using the most recent version of the wsadmin tool. 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 the wsadmin tool. For example, the commands do not run on a Version 6.1.0.x node.

About this task

Binding configurations are environment- and platform-specific information such as keystore information, keys used for signature and encryption, or authentication information. You can use the default binding for each policy set or define custom bindings within an application.

There are three types of bindings to use with your policy sets, including cell-level, application server level, and application-level. Default bindings are used at the cell-level or application server level. This topic refers to system binding information or bindings that are defined at the application level, which overrides the cell-level or application server level definition.
Note: Use default bindings only to develop and test applications. You must change signing and encryption keys before using your bindings in a production environment.

Procedure

  1. Launch the wsadmin scripting tool.
  2. Retrieve the current binding data for the attachment of interest.
    Use the getPolicySetAttachments command to determine the attachment ID. You will need to specify the attachment ID in the getBinding and setBinding commands to specify that this is a custom binding configuration. Use the following command to retrieve the attachment ID:
    AdminTask.getPolicySetAttachments('-applicationName application1')
    Use the getBinding command to display a properties object that contains each configuration attribute for a specific policy binding configuration. For application and client policy set attachments, specify a properties object for the -bindingLocation parameter using the application and attachmentId property names. For a system policy set attachment for the trust service, specify only the attachmentId property name. The following example queries for an application policy set binding configuration:
    AdminTask.getBinding('-policyType WSAddressing -bindingLocation "[[application application1]
    [attachmentId 123]]"')

    To return a specific configuration attribute for the policy, use the attributes parameter.

  3. Edit the binding configuration configuration.
    Use the setBinding command to update your binding configuration for a policy. To specify that you are editing a custom binding configuration, set the bindingLocation parameter by specifying the application and attachmentId property names in a properties object. You can additionally specify the attachmentType parameter as application, system/trust, or client. Customize your binding configuration with the following optional parameters:
    Parameter Description Data type
    -policyType Specifies the policy of interest. String, optional
    -remove Use this parameter to remove a specific policy from the binding configuration. The default value for the remove parameter is false. If the policyType parameter is not specified, the command removes the custom binding from the attachment. To delete the binding configuration, provide a value for the bindingName parameter and an asterisk character (*) for the attachmentId. Boolean, optional
    -attributes Specifies the attribute values to update. This parameter can include each binding configuration attribute for the policy or a subset of attributes to update. If you do not specify the attributes parameter, the command only updates the binding configuration location that the specified attachment uses. Properties, optional
    -bindingName Specifies the name for the binding configuration. Use this parameter to specify a name for the binding when you create a new custom binding. You can also use this parameter to switch an attachment to use a different, existing custom binding configuration. Lastly, you must specify a value for this parameter to delete a binding configuration. String, optional
    -replace Specifies whether to replace all of the existing binding configuration attributes with the attributes specified in the command. Use this parameter to remove optional parts of the configuration for policies with complex data. The default value is false. Boolean, optional

    The following example disables workload management for the myApplication application's default binding configuration for the WSAddressing policy:

    AdminTask.setBinding('[-policyType WSAddressing -bindingLocation "[ [application myApplication] 
    [attachmentId 123] ]" -attributes "[preventWLM false]" -attachmentType application]')
  4. Save the configuration changes.
    Enter the following command to save your changes.
    AdminConfig.save()



In this information ...


IBM Redbooks, demos, education, and more


Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

IBM Suggests
Task topic    

Terms of Use | Feedback

Last updated: Nov 25, 2008 2:35:59 AM CST
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/com.ibm.websphere.wsfep.multiplatform.doc/info/ae/ae/txml_wsfpappbinding.html