Attaching a policy set to a service artifact
Attach a policy set to a service artifact, such as an application, service, endpoint or operation, to define the quality of services that are supported. Policy sets can define the policies for WS-Addressing, WS-Security, WS-ReliableMessaging, WS-Transaction, HTTP transport, Java™ Messaging Service (JMS) transport, and Secure Sockets Layer (SSL) transport.
Before you begin
About this task
Develop a web service that contains each of the necessary artifacts, and deploy your web services application into your application server instance. Now you can attach policy sets to your service artifacts, such as an application, service, or endpoint.
避免困難: If you are
attaching a WS-Security policy to your provider application, and your
SOAP requests do not contain a SOAPAction in the HTTP header or WS-Addressing
action in the message, you cannot apply policies at the operation
level. You can attach policies only at the Application, Service, or
Endpoint level. For provider applications, regardless of any other
policy attachments at any level, if you attach a policy to one or
more operations, and there is no SOAPAction or WS-Addressing Action
in the SOAP request, then you receive the following error in the SOAP
response: CWWSS7509W: The received SOAP request message is rejected becasue it does not correctly specify SOAP action and WS-Addressing action while there is at least one PolicySet attachment at operation level of the xyz service.
gotchaTo attach a policy set to a service artifact, perform the following steps:
Procedure
Results
Example
- Locate the app1 application in the Applications > Enterprise applications collection.
- Click the app1 application.
- Click the Service provider policy sets and bindings link or the Service client policy sets and bindings link.
- Select the check box for the service artifact where the policy set is to be attached.
- Click Attach. Select WSSecurity default policy set.
- Click Save, to save your changes to the master configuration.
What to do next
You can configure the service client or service provider to share their policies. Read about using WS-Policy to exchange policies in a standard format.
作業主題