You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wss4j-dev@ws.apache.org by Sergio Patricio <se...@link.pt> on 2008/06/23 14:18:25 UTC
Actor/role in WSS4JHandler
Hello,
I have successful configured a webservice using WSS4J, to secure the messages I used JAX-RPC handlers.
Now I'm trying to do the same using the WSS4JHandler, I have the following configuration example in the server:
<handler>
<handler-name>WSS4JHandler</handler-name>
<handler-class>org.apache.ws.security.handler.WSS4JHandler</handler-class>
<init-param>
<param-name>action</param-name>
<param-value>UsernameToken</param-value>
</init-param>
<init-param>
<param-name>passwordCallbackClass</param-name>
<param-value>(my callback handler)</param-value>
</init-param>
<init-param>
<param-name>passwordType</param-name>
<param-value>PasswordDigest</param-value>
</init-param>
<init-param>
<param-name>deployment</param-name>
<param-value>server</param-value>
</init-param>
<init-param>
<param-name>user</param-name>
<param-value>server</param-value>
</init-param>
</handler>
When the client send a request, the server throws the error:
caught exception while handling request: java.lang.IllegalArgumentException: Invalid value for actor or role
java.lang.IllegalArgumentException: Invalid value for actor or role
at com.sun.xml.messaging.saaj.soap.impl.HeaderImpl.getHeaderElementsForActor(HeaderImpl.java:77)
at com.sun.xml.messaging.saaj.soap.impl.HeaderImpl.examineHeaderElements(HeaderImpl.java:64)
at org.apache.ws.security.handler.WSS4JHandler.doReceiver(WSS4JHandler.java:430)
at org.apache.ws.security.handler.WSS4JHandler.processMessage(WSS4JHandler.java:159)
at org.apache.ws.security.handler.WSS4JHandler.handleRequest(WSS4JHandler.java:98)
Do I have the specify the actor in security header?
When using 'processSecurityHeader()' the actor may be null, but using the WSS4JHandler not.
Thanks,
Sérgio Patrício