Skip to main content

Custom Actions

You can specify custom WSS4J Action configurations on the WSS4JOutInterceptor. To activate this configuration option, one provides a non-WSS4J defined property, wss4j.action.map, to the WSS4JOutInterceptor as shown in the following Spring example. The same configuration can be achieved through the API as well. The key value is an integer representing the WSS4J action identifier. The entry values can be a String representing a class name of the action to instantiate or an Object implementing Action. This configuration option allows you to override built-in action implementations or add your own.

<bean class="org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor">
   <constructor-arg>
      <map>
         ...
         <!-- Redefines the action for SAMLTokenSigned to use 
              a custom implementation.  -->
         <entry key="wss4j.action.map">
            <map key-type="java.lang.Integer" value-type="java.lang.Object">
               <entry key="0x10" value-ref="mySamlTokenSignedAction"/>
            </map>
         </entry>      
         ...
      </map>
  </constructor-arg>
</bean>

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!