Versions Compared

Key

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

WS-Security

WS-Security is one of the soap policies that can be enable on SOAP endpoints.

To configure such a policy, you need to add the following tag to you endpoint definition:

Code Block
langxml

<http:endpoint xmlns:soap="http://servicemix.apache.org/soap/1.0" ...>
  <http:policies>
    <soap:ws-security ... />
  </http:policies>
</http:endpoint>

The full schema can be found hereThis page currently contains a few example showing how to configure WS-Security.

Inbound UsernameToken

Code Block
langxml
<!-- Secured endpoint using ws-sec authentication -->
<http:endpoint service="ex:receiver"
               endpoint="http-wssec"
               targetService="ex:receiver"
               role="consumer"
               locationURI="http://localhost:8192/WSSec/"
               defaultMep="http://www.w3.org/2004/08/wsdl/in-only"
               soap="true">
  <http:policies>
    <soap:ws-addressing />
    <!-- Enable ws-sec with UsernameToken -->
    <soap:ws-security receiveAction="UsernameToken" />
  </http:policies>
</http:endpoint>

...