dataEncKey = tokenInfo.getDataProtectionKey();
ek = tokenInfo.getEncryptedKey();
ArrayList targets = featureBinding.getTargetBindings();
Iterator targetItr = targets.iterator();
ETHandler edBuilder = new ETHandler(context.getSOAPVersion());
EncryptionPolicy.FeatureBinding binding = (FeatureBinding) wssPolicy.getFeatureBinding();
dataRefList = new ReferenceList();
if(ek == null || binding.getUseStandAloneRefList()){
edKeyInfo = tokenInfo.getKeyInfo();
}
boolean refAdded = false;
while (targetItr.hasNext()) {
EncryptionTarget target = (EncryptionTarget)targetItr.next();
boolean contentOnly = target.getContentOnly();
//target.getDataEncryptionAlgorithm();
//target.getCipherReferenceTransforms();//TODO support this
List edList = edBuilder.buildEDList( (EncryptionPolicy)wssPolicy,target ,context, dataEncKey,edKeyInfo);
for(int i =0;i< edList.size();i++){
JAXBElement<ReferenceType> rt = elementFactory.createDataReference((SecurityElement)edList.get(i));
dataRefList.getDataReferenceOrKeyReference().add(rt);
refAdded = true;