" </sp:AlgorithmSuite>\n" +
"</wsp:Policy>\n" +
"</sp:SymmetricBinding>";
PolicyEnforcer policyEnforcer = buildAndStartPolicyEngine(policyString);
KerberosTokenSecurityEvent initiatorTokenSecurityEvent = new KerberosTokenSecurityEvent();
initiatorTokenSecurityEvent.setIssuerName("xs:anyURI");
KerberosServiceSecurityTokenImpl kerberosServiceSecurityToken =
new KerberosServiceSecurityTokenImpl(null, null, null, WSSConstants.NS_Kerberos5_AP_REQ, IDGenerator.generateID(null),
WSSecurityTokenConstants.KeyIdentifier_EmbeddedKeyIdentifierRef);
kerberosServiceSecurityToken.addTokenUsage(WSSecurityTokenConstants.TokenUsage_MainSignature);
initiatorTokenSecurityEvent.setSecurityToken(kerberosServiceSecurityToken);
policyEnforcer.registerSecurityEvent(initiatorTokenSecurityEvent);
KerberosTokenSecurityEvent recipientTokenSecurityEvent = new KerberosTokenSecurityEvent();
recipientTokenSecurityEvent.setIssuerName("xs:anyURI");
kerberosServiceSecurityToken =
new KerberosServiceSecurityTokenImpl(null, null, null, WSSConstants.NS_Kerberos5_AP_REQ, IDGenerator.generateID(null),
WSSecurityTokenConstants.KeyIdentifier_EmbeddedKeyIdentifierRef);
kerberosServiceSecurityToken.addTokenUsage(WSSecurityTokenConstants.TokenUsage_MainEncryption);
recipientTokenSecurityEvent.setSecurityToken(kerberosServiceSecurityToken);
policyEnforcer.registerSecurityEvent(recipientTokenSecurityEvent);
List<XMLSecurityConstants.ContentType> protectionOrder = new LinkedList<XMLSecurityConstants.ContentType>();
protectionOrder.add(XMLSecurityConstants.ContentType.SIGNATURE);
protectionOrder.add(XMLSecurityConstants.ContentType.ENCRYPTION);
SignedPartSecurityEvent signedPartSecurityEvent =
new SignedPartSecurityEvent(
(InboundSecurityToken)recipientTokenSecurityEvent.getSecurityToken(), true, protectionOrder);
signedPartSecurityEvent.setElementPath(WSSConstants.SOAP_11_BODY_PATH);
policyEnforcer.registerSecurityEvent(signedPartSecurityEvent);
ContentEncryptedElementSecurityEvent contentEncryptedElementSecurityEvent =
new ContentEncryptedElementSecurityEvent(
(InboundSecurityToken)recipientTokenSecurityEvent.getSecurityToken(), true, protectionOrder);
contentEncryptedElementSecurityEvent.setElementPath(WSSConstants.SOAP_11_BODY_PATH);
policyEnforcer.registerSecurityEvent(contentEncryptedElementSecurityEvent);
OperationSecurityEvent operationSecurityEvent = new OperationSecurityEvent();
operationSecurityEvent.setOperation(new QName("definitions"));