* of policyId of issuedTokenAssertion
*/
Message message = packet.getMessage();
for (PolicyAlternativeHolder p : this.policyAlternatives) {
WSDLBoundOperation operation = message.getOperation(pipeConfig.getWSDLPort());
SecurityPolicyHolder sph = (SecurityPolicyHolder) p.getOutMessagePolicyMap().get(operation);
if (sph != null && sph.isIssuedTokenAsEncryptedSupportingToken()) {
MessagePolicy policy = sph.getMessagePolicy();
ArrayList list = policy.getPrimaryPolicies();
Iterator i = list.iterator();
boolean breakOuterLoop = false;
while (i.hasNext()) {
SecurityPolicy primaryPolicy = (SecurityPolicy) i.next();
if (PolicyTypeUtil.encryptionPolicy(primaryPolicy)) {
EncryptionPolicy encPolicy = (EncryptionPolicy) primaryPolicy;
EncryptionPolicy.FeatureBinding featureBinding = (EncryptionPolicy.FeatureBinding) encPolicy.getFeatureBinding();
ArrayList targetList = featureBinding.getTargetBindings();
ListIterator iterator = targetList.listIterator();
while (iterator.hasNext()) {
EncryptionTarget encryptionTarget = (EncryptionTarget) iterator.next();
String targetURI = encryptionTarget.getValue();
if (targetURI.equals(issuedTokenPolicyId)) {
if (ctx != null) {
GenericToken issuedToken = (GenericToken) ctx.getSecurityToken();
encryptionTarget.setValue(issuedToken.getId());
sph.setMessagePolicy(policy);
p.getOutMessagePolicyMap().put(operation, sph);
breakOuterLoop = true;
break;
}
}