-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I'm tring to build my own certificates to sign outgoing messages from my server.
When running the testcase i've got the following error, but I can't understand it: - ------------- AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException faultSubcode: faultString: WSDoAllSender: Signature: error during message procesingorg.apache.ws.security.WSSecurityException: General security error (Unexpected number of X509Data: for Signature) faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}hostname:digitalman WSDoAllSender: Signature: error during message procesingorg.apache.ws.security.WSSecurityException: General security error (Unexpected number of X509Data: for Signature) at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:221) at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:128) at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1083) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at javax.xml.parsers.SAXParser.parse(SAXParser.java:345) at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:226) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:645) at org.apache.axis.Message.getSOAPEnvelope(Message.java:424) at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:173) at org.apache.axis.client.Call.invokeEngine(Call.java:2719) at org.apache.axis.client.Call.invoke(Call.java:2702) at org.apache.axis.client.Call.invoke(Call.java:2378) at org.apache.axis.client.Call.invoke(Call.java:2301) at org.apache.axis.client.Call.invoke(Call.java:1758) at localhost.axis.services.Didattica.DidatticaSoapBindingStub.getFacoltaDesc(DidatticaSoapBindingStub.java:288) at localhost.axis.services.Didattica.test.TestWebServiceDidattica.testWsClientGetFacoltaDesc(TestWebServiceDidattica.java:38) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:421) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186) - ------------- This is my configuration: - -------------- localhost$ cat it/unibo/universibo/didattica/deploy-wss4jSignAuth.wsdd [...cut...] <responseFlow> <handler name="DoSecuritySender" type="java:org.apache.ws.axis.security.WSDoAllSender" > <parameter name="user" value="1t3d-34s3-5gsh-65wf-56qs-5hs9-awwc-s4bn"/> <parameter name="passwordCallbackClass" value="it.unibo.universibo.didattica.PasswordCallback"/> <parameter name="action" value="Signature" /> <parameter name="signaturePropFile" value="cryptoJksServer.properties" /> <parameter name="signatureKeyIdentifier" value="DirectReference" /> </handler> </responseFlow> [...cut...] - -------------- localhost$ cat cryptoJksServer.properties 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=wss4jPassword org.apache.ws.security.crypto.merlin.keystore.alias=wss4jCertDSA org.apache.ws.security.crypto.merlin.file=server.keystore - -------------- ...i've built my keystore following the instructions in the wss4j key example localhost$ keytool -list -keystore server.keystore Enter keystore password: wss4jPassword Keystore type: jks Keystore provider: SUN Your keystore contains 2 entries ca_own, Dec 29, 2004, trustedCertEntry, Certificate fingerprint (MD5): F8:43:D2:3B:45:1B:1C:FF:64:97:1E:69:D9:ED:8E:B2 wss4jcertdsa, Dec 29, 2004, keyEntry, Certificate fingerprint (MD5): 30:55:3C:4A:18:69:F8:0C:85:D9:87:1B:DE:0E:25:2E - -------------- Thank you for any feedback ...and happy new year! :) Ciao, Ilias - -- /** * Reply to: ilias.bartolini(at)studio.unibo.it * ICQ# 42797710 - FeSToso n°143 - PGP Key-IDs:0x6A951A45 * http://www.brainetwork.net/homepage * https://www.universibo.unibo.it */ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFB02An+CP4pmqVGkURAqB9AJ9+nY+UM2d+cyQ24nQlSvZYkqruVACdGIR+ bxRYvr7MtZemmbxwQehqxvE= =ssOF -----END PGP SIGNATURE-----