Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Out Message should be selected if you want the security policy to be applicable only for the outgoing messages of the ESB relating to the selected binding.

 

A policy to SOAP 1.1 and SOAP 1.2 bindings at Binding level can defined in the services.xml by adding the following code (see also The WS-Policy Editor):

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>

For the Binding Operation level the <wsp:AppliesTo> element is used to define the scope of the policy.

The XML snippet is as follows:

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>

The configuration is similar for the Binding Message level for the out message. The identifier attribute of the <policy-subject/> element in <wsp:AppliesTo> changes to binding:soap11/operation:echo/out.

The XML snippet is as follows:

Code Block
<wsp:PolicyAttachment xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
  <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>
Info
titleNote

Further details can be found at:

...