Managing policy sets and bindings for services references using the administrative console
Use this administrative console task to manage policy sets and bindings for the service reference, its endpoints, and operations.
Before you begin
Before completing this task, you must install one or more Java™ API for API for XML-based Web Services (JAX-WS) web services, that contain at least one client service reference.
About this task
You have developed a web service that contains all the necessary artifacts and deployed your web services application into your application server instance. Now, you can attach or detach policy sets and manage the associated bindings.
When you configure the policy set attachments for a service reference, you can override the policy set attachments that are inherited from the service client using the administrative console. You can attach a policy set and binding for a service reference that is different from the policy set attachment for the service client. You can also specify to not attach a policy set to a service reference, even if a policy set is attached to the service client.
The default behavior is that a service reference, and its endpoints and operations, inherits the policy set attachment of the corresponding resources of the service. Service references are only valid for service clients.
Using the administrative console, you can configure the service reference to either inherit policy set and bindings configuration from the service client or to specify individual settings for the service reference by attaching policy sets and bindings that are different from the policy sets and bindings attached to the service client.
The policy set information is displayed in the Attached Policy Set column. If a policy set is directly attached, then the policy set name is displayed; for example, WS-I RSP. If there is no policy set attached, and a policy set is attached at a higher level or to the service client, then the word inherited in parentheses is appended to the policy set name, as the following example demonstrates: WS-I RSP (inherited). If there is no policy set attached directly or at a higher level, then None is displayed.
- Not applicable. There is no policy set attached, either directly, to a service client resource, or to a higher level service reference resource.
- Binding_name or Default. The binding name is displayed if a policy set is attached directly and an application-specific binding or a general binding is assigned, for example, MyBindings1. Default is displayed if a policy set is attached directly but the service reference resource uses the default bindings.
- Binding_name (inherited) or Default (inherited). A service resource inherits the bindings from an attachment to a service client resource or a higher level service reference resource.
There are two types of bindings, application specific bindings and general bindings.
Application specific binding
You can create application specific bindings only at a policy set attachment point. These bindings are specific to and constrained to the characteristics of the defined policy. Application specific bindings are capable of providing configuration for advanced policy requirements, such as multiple signatures; however, these bindings are only reusable within an application. Furthermore, application specific bindings have very limited reuse across policy sets.
When you create an application specific binding for a policy set attachment, the binding begins in a completely unconfigured state. You must add each policy, such as WS-Security or HTTP transport, that you want to override the default binding and fully configure the bindings for each policy that you have added. For WS-Security policy, some high-level configuration attributes such as TokenConsumer, TokenGenerator, SigningInfo, or EncryptionInfo might be obtained from the default bindings if they are not configured in the application specific bindings.
For service clients, you can only create application specific bindings by selecting
for service client resources that have an attached policy set. See service clients policy sets and bindings collection. Similarly, for service clients, you can only create application specific bindings by selecting for service client resources that have an attached policy set. See service client policy set and bindings collection.General bindings
General bindings can be configured to be used across a range of policy sets and can be reused across applications and for trust service attachments. Though general bindings are highly reusable, they are however not able to provide configuration for advanced policy requirements, such as multiple signatures. There are two types of general bindings:
- General provider policy set bindings
- General client policy set bindings
You can create general client policy set bindings by accessing New in the general provider policy sets panel or by accessing > New in the general client policy set and bindings panel. See defining and managing service client or provider bindings.
>根據啟用安全時所指派的安全角色而定,您可能會有建立或編輯配置資料之文字輸入欄位或按鈕的存取權。 請檢閱管理角色說明文件,以進一步瞭解應用程式伺服器的有效角色。

- You must not create these types of attachments for applications that are deployed on an application server that is prior to WebSphere Application Server Version 8.0. Service reference attachments are only supported on WebSphere Application Server Version 8.0 and later.
- An application that contains these types of attachments must not be deployed on an application server that is prior to WebSphere Application Server Version 8.0.
- If an application that is deployed in a cluster environment contains these types of attachments, you must not add a member application server that is prior to WebSphere Application Server Version 8.0 to the cluster.
Procedure
Results
When you finish this task, you have specified policy sets and bindings for a service reference.
Example
- Locate EchoService12 in the Service clients collection. Alternatively, you can locate EchoService12 in the collection. >WSSampleClientSei >
- Click Override, to override the service client attachments.
- Select the check box for the EchoService12Port resource, and click Attach Client Policy Set.
- Select the WSSecurity default policy from the list.
- Click Save to save your changes to the master configuration.
- Locate EchoService12 in the Service clients collection. Alternatively, you can locate EchoService12 in the collection. >WSSampleClientSei >
- Click Inherit, to clear the existing policy set and binding settings for the service reference and to use policy set attachments that are defined by the service client.
- Click OK on the Inherit policy sets page to confirm that you want to inherit the policy set attachments that are defined by the service client. You can optionally select the check box to not show the inherit confirmation page in the future.
- Click Save to save your changes to the master configuration.
What to do next
You can now proceed to manage other service references for the service client or to manage policy sets and bindings for service clients at the application level using the administrative console.