WS-Policy is used for configuring WS-Security, WS-Reliable Messaging, caching, and throttling. The WS-Policy Attachment specification defines a set of policy subjects that can be used to attach or apply security policies. You can apply WS-Policy to your services at different levels such as service, service operation, service operation message, binding, binding operation, binding operation message, etc.
To apply a security policy, when viewing the service details in the management console, click Policies, and then
Defining Policies at Bindings
...
Code Block |
---|
<wsp:PolicyAttachment xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"> <wsp:AppliesTo> <policy-subject identifier="binding:soap11" /> <policy-subject identifier="binding:soap12" /> </wsp:AppliesTo> <wsp:Policy wsu:Id="binding_level_policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> </wsp:Policy> </wsp:PolicyAttachment> |
...
Code Block |
---|
<wsp:PolicyAttachment xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"> <wsp:AppliesTo> <policy-subject identifier="binding:soap11/operation:Echo" /> <policy-subject identifier="binding:soap12/operation:Echo" /> </wsp:AppliesTo> <wsp:Policy wsu:Id="binding_level_policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> </wsp:Policy> </wsp:PolicyAttachment> |
...
Code Block |
---|
<wsp:PolicyAttachment xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"><wsp> <wsp:AppliesTo> <policy-subject identifier="binding:soap11/operation:secureEcho/in" /> <policy-subject identifier="binding:soap12/operation:secureEcho/in" /> </wsp:AppliesTo> <wsp:Policy wsu:Id="binding_level_policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> </wsp:Policy> </wsp:PolicyAttachment> |
...