Dave,
I would be interested in seeing your wss4j example as well. I have tried to switch over and get essentially the same result. Maybe the problem is in my keystore, since it does look a good bit different from yours.
Thanks for posting!
Bob
Here is my wssj security configuration:
Server Side:
Code:
<bean id="wsSecurityInterceptor"
class="org.springframework.ws.soap.security.wss4j.Wss4jSecurityInterceptor">
<property name="validationActions" value="Signature" />
<property name="validationSignatureCrypto" ref="keyStore" />
<property name="securementActions" value="NoSecurity" />
</bean>
<bean id="keyStore"
class="org.springframework.ws.soap.security.wss4j.support.CryptoFactoryBean">
<property name="keyStorePassword" value="xxx" />
<property name="keyStoreLocation" value="classpath:hrworx.jks" />
</bean>
Client side:
Code:
<bean id="wsSecurityInterceptor"
class="org.springframework.ws.soap.security.wss4j.Wss4jSecurityInterceptor">
<property name="securementActions" value="Signature" />
<property name="securementUsername" value="hrworxserver" />
<property name="securementPassword" value="formworx" />
<property name="securementSignatureCrypto" ref="keyStore" />
<property name="securementSignatureKeyIdentifier" value="DirectReference"/>
<property name="validationActions" value="NoSecurity" />
</bean>
<bean id="keyStore"
class="org.springframework.ws.soap.security.wss4j.support.CryptoFactoryBean">
<property name="keyStorePassword" value="formworx" />
<property name="keyStoreLocation" value="classpath:/hrworx.jks" />
</bean>
and the exception (essentially the same thing I was getting with XWS):
Code:
org.springframework.ws.soap.client.SoapFaultClientException: No WS-Security header found
Your keystore looks like this:
Code:
Keystore type: jks
Keystore provider: SUN
Your keystore contains 1 entry
Alias name: dortman
Creation date: Jun 1, 2009
Entry type: keyEntry
Certificate chain length: 1
Certificate[1]:
Owner: CN=Dave Ortman, OU=Unknown, O=Vantage Consulting Group, L=Sacramento, ST=CA, C=US
Issuer: CN=Dave Ortman, OU=Unknown, O=Vantage Consulting Group, L=Sacramento, ST=CA, C=US
Serial number: 4a24667d
Valid from: Mon Jun 01 17:38:37 CST 2009 until: Sun Aug 30 17:38:37 CST 2009
Certificate fingerprints:
MD5: 12:04:89:6F:C6:7F:09:EF:F9:97:D8:EE:A0:FF:90:61
SHA1: 0C:72:9A:2D:5D:63:FA:82:1E:AB:5B:2E:A1:B3:55:67:DA:D0:61:32
Mine looks like this:
Code:
Keystore type: jks
Keystore provider: SUN
Your keystore contains 3 entries
Alias name: hrworxserver
Creation date: May 29, 2009
Entry type: keyEntry
Certificate chain length: 3
Certificate[1]:
Owner: CN=formworx.hrworx.com, OU=Terms of use at www.verisign.com/cps/testca (c)05, OU=Corporate, O=hrworx, L=Sterling, ST=Virginia, C=US
Issuer: CN=VeriSign Trial Secure Server CA - G2, OU=Terms of use at https://www.verisign.com/cps/testca (c)09, OU="For Test Purposes Only. No assurances.", O="VeriSign, Inc.", C=US
Serial number: 2ed3a08e0f1a51e2f61bc8b3259e9457
Valid from: Thu May 28 18:00:00 CST 2009 until: Fri Jun 12 17:59:59 CST 2009
Certificate fingerprints:
MD5: 41:45:3B:EB:62:3B:5A:5F:D4:3C:59:50:15:D9:42:0A
SHA1: 60:1C:A9:D7:85:60:54:A8:9C:55:BB:F9:57:1F:95:FC:0A:25:0C:47
Certificate[2]:
Owner: CN=VeriSign Trial Secure Server CA - G2, OU=Terms of use at https://www.verisign.com/cps/testca (c)09, OU="For Test Purposes Only. No assurances.", O="VeriSign, Inc.", C=US
Issuer: CN=VeriSign Trial Secure Server Root CA - G2, OU="For Test Purposes Only. No assurances.", O="VeriSign, Inc.", C=US
Serial number: 7e3bb784bbc654abd2b8d677ecc394a8
Valid from: Tue Mar 31 18:00:00 CST 2009 until: Sun Mar 31 17:59:59 CST 2019
Certificate fingerprints:
MD5: 71:13:D9:3A:CD:21:F2:EE:9F:59:17:8D:A6:F9:AE:14
SHA1: BE:D1:D1:4E:25:A7:94:36:83:9E:4B:A7:CD:84:48:96:B7:0A:7F:B0
Certificate[3]:
Owner: CN=VeriSign Trial Secure Server Root CA - G2, OU="For Test Purposes Only. No assurances.", O="VeriSign, Inc.", C=US
Issuer: CN=VeriSign Trial Secure Server Root CA - G2, OU="For Test Purposes Only. No assurances.", O="VeriSign, Inc.", C=US
Serial number: 168164a428ca12dfab12f19fb1b93554
Valid from: Tue Mar 31 18:00:00 CST 2009 until: Sat Mar 31 17:59:59 CST 2029
Certificate fingerprints:
MD5: E0:19:F5:FC:C0:9A:13:0E:38:B7:BF:0D:02:40:D3:C2
SHA1: 51:51:B8:63:8A:4C:1F:15:54:56:ED:37:C9:10:35:CA:D3:01:B9:36
*******************************************
*******************************************
Alias name: verisigndemointermediatecert
Creation date: May 29, 2009
Entry type: trustedCertEntry
Owner: CN=VeriSign Trial Secure Server CA - G2, OU=Terms of use at https://www.verisign.com/cps/testca (c)09, OU="For Test Purposes Only. No assurances.", O="VeriSign, Inc.", C=US
Issuer: CN=VeriSign Trial Secure Server Root CA - G2, OU="For Test Purposes Only. No assurances.", O="VeriSign, Inc.", C=US
Serial number: 7e3bb784bbc654abd2b8d677ecc394a8
Valid from: Tue Mar 31 18:00:00 CST 2009 until: Sun Mar 31 17:59:59 CST 2019
Certificate fingerprints:
MD5: 71:13:D9:3A:CD:21:F2:EE:9F:59:17:8D:A6:F9:AE:14
SHA1: BE:D1:D1:4E:25:A7:94:36:83:9E:4B:A7:CD:84:48:96:B7:0A:7F:B0
*******************************************
*******************************************
Alias name: verisigndemocert
Creation date: May 29, 2009
Entry type: trustedCertEntry
Owner: CN=VeriSign Trial Secure Server Root CA - G2, OU="For Test Purposes Only. No assurances.", O="VeriSign, Inc.", C=US
Issuer: CN=VeriSign Trial Secure Server Root CA - G2, OU="For Test Purposes Only. No assurances.", O="VeriSign, Inc.", C=US
Serial number: 168164a428ca12dfab12f19fb1b93554
Valid from: Tue Mar 31 18:00:00 CST 2009 until: Sat Mar 31 17:59:59 CST 2029
Certificate fingerprints:
MD5: E0:19:F5:FC:C0:9A:13:0E:38:B7:BF:0D:02:40:D3:C2
SHA1: 51:51:B8:63:8A:4C:1F:15:54:56:ED:37:C9:10:35:CA:D3:01:B9:36