login button

Unexpected number of X509Data: for Signature. Why?

Story :

Project :

Q: I get an exception saying "Unexpected number of X509Data: for Signature". Where have I gone wrong? A: This occurs when the value of your "user" parameter is different from the alias of the private key that you have in your keystore. Also make sure you provide the password of the private key in the callback handler that you specify in the configuration (passwordCallbackClass). Example: If your keystore holds a private key with the alias : bob Axis 1.x:

<requestFlow>
<handler type="java:org.apache.ws.axis.security.WSDoAllSender">
<parameter name="user" value="bob"/>
<parameter name="action" value="Timestamp Signature"/>
....
....
</handler>
</requestFlow>

Axis2/Rampart :

<parameter name="OutflowSecurity">
<action>
<items>Timestamp Signature</items>
<user>bob</user>
....
....
</action>
</parameter>

Applies To:

  • Apache WSS4J and Apache Rampart/Java
  • JDK - 1.4, 1.5
5
Average: 5 (1 vote)