Did you add bouncycastle as a provider in your jre?
(http://www.bouncycastle.org/wiki/display/JA1/Provider+Installation)
On 2/7/07, Tonkikh Maxim <[EMAIL PROTECTED]> wrote:
Hello Axis2 Team
We are tiring to build and use generated by AXIS2 code, for HOTMAIL MSP 3.0
wsdl
When I try to configure axis2.xml to use hmac-sha1 signature algorithm
<parameter name="OutflowSecurity">
<action>
<items>Signature</items>
<user>gene</user>
<passwordCallbackClass>com.comverse.msp30client.PWCallback</passwordCallbackClass>
<signaturePropFile>security.properties</signaturePropFile>
<signatureAlgorithm>http://www.w3.org/2000/09/xmldsig#hmac-sha1</signatureAlgorithm>
</action>
</parameter>
security.properties file is:
org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
org.apache.ws.security.crypto.merlin.keystore.type=jks
org.apache.ws.security.crypto.merlin.keystore.password=mykeystorepassword
org.apache.ws.security.crypto.merlin.file=mykeys.jks
Key is
keytool -genkey -alias gene -keyalg DSA -keysize 512 -keystore mykeys.jks
I got the following Exception
Thanx
Maxim
WSDL file: <<mailservice.wsdl>>
org.apache.axis2.AxisFault: WSHandler: Signature: error during message
procesingorg.apache.ws.security.WSSecurityException:
Signature creation failed; nested exception is:
org.apache.xml.security.signature.XMLSignatureException:
Sorry, you supplied the wrong key type for this operation! You supplied a
sun.security.provider.DSAPrivateKey but a
javax.crypto.SecretKey is needed.
Original Exception was
org.apache.xml.security.signature.XMLSignatureException:
Sorry, you supplied the wrong key type for this operation! You supplied a
sun.security.provider.DSAPrivateKey but a
javax.crypto.SecretKey is needed.; nested exception is:
org.apache.ws.security.WSSecurityException:
WSHandler: Signature: error during message
procesingorg.apache.ws.security.WSSecurityException:
Signature creation failed; nested exception is:
org.apache.xml.security.signature.XMLSignatureException:
Sorry, you supplied the wrong key type for this operation! You supplied a
sun.security.provider.DSAPrivateKey but a
javax.crypto.SecretKey is needed.
Original Exception was
org.apache.xml.security.signature.XMLSignatureException:
Sorry, you supplied the wrong key type for this operation! You supplied a
sun.security.provider.DSAPrivateKey but a
javax.crypto.SecretKey is needed.
at
org.apache.rampart.handler.WSDoAllSender.processMessage(WSDoAllSender.java:92)
at
org.apache.rampart.handler.WSDoAllHandler.invoke(WSDoAllHandler.java:74)
at
org.apache.axis2.engine.Phase.invoke(Phase.java:382)
at
org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:522)
at
org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:655)
at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:237)
at
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:202)
at
com.comverse.msp30client.MailServiceStub.Sync(MailServiceStub.java:248)
at
com.comverse.msp30client.MailServiceTest.testSync(MailServiceTest.java:177)
at
com.comverse.msp30client.MailServiceTest.main(MailServiceTest.java:359)
Caused by: org.apache.ws.security.WSSecurityException:
WSHandler: Signature: error during message
procesingorg.apache.ws.security.WSSecurityException:
Signature creation failed; nested exception is:
org.apache.xml.security.signature.XMLSignatureException:
Sorry, you supplied the wrong key type for this operation! You supplied a
sun.security.provider.DSAPrivateKey but a
javax.crypto.SecretKey is needed.
Original Exception was
org.apache.xml.security.signature.XMLSignatureException:
Sorry, you supplied the wrong key type for this operation! You supplied a
sun.security.provider.DSAPrivateKey but a
javax.crypto.SecretKey is needed.
at
org.apache.ws.security.action.SignatureAction.execute(SignatureAction.java:57)
at
org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:192)
at
org.apache.rampart.handler.WSDoAllSender.processBasic(WSDoAllSender.java:254)
at
org.apache.rampart.handler.WSDoAllSender.processMessage(WSDoAllSender.java:86)
... 9 more
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services Developers
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]