Hi Ted,

I assume that your CertificateStore object implements wss4j 
org.apache.ws.security.components.crypto .Crypto interface, does it?
The reason why CXF needs SIGNATURE_USERNAME property is the following: even 
single CXF client can be used by multiple users having different private and 
public keys.
Therefore Crypto interface provides method getX509Certificates() with 
CryptoType argument, that specifies keystore alias (or other X509 identifier) 
to be used.

If you always has only one user and single certificate, you can provide any 
non-empty value in Crypto.getDefaultX509Identifier() method and just ignore it 
in Crypto.getX509Certificates().

Regards,        
Andrei.

> -----Original Message-----
> From: Ted Roeloffzen [mailto:ted.roeloff...@gmail.com]
> Sent: Freitag, 12. Juli 2013 11:31
> To: users
> Subject: CXF WS-security policy question
> 
> Hi All,
> 
> I'm trying to create a webservice client that uses the securitypolicy which is
> specified in the WSDL.
> As the certificate that is used for this client has to be loaded from the
> database i created a Interceptor that sets the SIGNATURE_CRYPTO property
> with a CertificateStore object that contains the correct certificate.
> When i try to send a message i get the following error-message: No
> configured signature username detected
> 
> Because there is only one certificate in the CertificateStore, there is no 
> need
> for a username. But nonetheless I get this error.
> 
> Can anyone point me in the right direction?
> 
> Greate many thanks.
> 
> Kind regards,
> 
> Ted Roeloffzen

Reply via email to