headerPath.addAll(WSSConstants.WSSE_SECURITY_HEADER_PATH);
headerPath.add(WSSConstants.TAG_wsu_Timestamp);
requiredElementSecurityEvent.setElementPath(headerPath);
policyEnforcer.registerSecurityEvent(requiredElementSecurityEvent);
X509TokenSecurityEvent x509TokenSecurityEvent = new X509TokenSecurityEvent();
X509SecurityTokenImpl securityToken = getX509Token(WSSecurityTokenConstants.X509V3Token);
securityToken.addTokenUsage(WSSecurityTokenConstants.TokenUsage_MainSignature);
x509TokenSecurityEvent.setSecurityToken(securityToken);
policyEnforcer.registerSecurityEvent(x509TokenSecurityEvent);
x509TokenSecurityEvent = new X509TokenSecurityEvent();
securityToken = getX509Token(WSSecurityTokenConstants.X509V3Token);
securityToken.addTokenUsage(WSSecurityTokenConstants.TokenUsage_MainEncryption);
x509TokenSecurityEvent.setSecurityToken(securityToken);
policyEnforcer.registerSecurityEvent(x509TokenSecurityEvent);
List<XMLSecurityConstants.ContentType> protectionOrder = new LinkedList<XMLSecurityConstants.ContentType>();
protectionOrder.add(XMLSecurityConstants.ContentType.SIGNATURE);
protectionOrder.add(XMLSecurityConstants.ContentType.ENCRYPTION);