Client.java
import org.apache.cxf.rt.security.SecurityConstants;
Map<String, Object> ctx = ((BindingProvider)verificacionJugadores_Service).getRequestContext();
ctx.put(SecurityConstants.SIGNATURE_PROPERTIES,merlin.properties);
try {
portWS.metodoWS();
}
catch (Exception e) {
log.error(e);
}
Merlin.properties
org.apache.wss4j.crypto.provider=org.apache.wss4j.common.crypto.Merlin
org.apache.wss4j.crypto.merlin.keystore.type=jks
org.apache.wss4j.crypto.merlin.keystore.password=passwordkeystore
org.apache.wss4j.crypto.merlin.keystore.alias=nomealias
org.apache.wss4j.crypto.merlin.keystore.file=nomefile.jks
maven pom.xml
<dependency>
<groupId>org.apache.wss4j</groupId>
<artifactId>wss4j-bindings</artifactId>
<version>2.1.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.wss4j</groupId>
<artifactId>wss4j-integration</artifactId>
<version>2.1.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.wss4j</groupId>
<artifactId>wss4j-ws-security-common</artifactId>
<version>2.1.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.wss4j</groupId>
<artifactId>wss4j-ws-security-dom</artifactId>
<version>2.1.1</version>
<scope>compile</scope>
</dependency>