ArrayList policyComponents = new ArrayList();
// process <wsp:Policy> elements ..
for (Iterator policyElements = PolicyUtil.getPolicyChildren(attachmentElement);
policyElements.hasNext();) {
PolicyComponent policy = PolicyUtil
.getPolicyFromOMElement((OMElement)policyElements
.next());
policyComponents.add(policy);
}
// process <wsp:PolicyReference> elements ..
for (Iterator policyRefElements = PolicyUtil.getPolicyRefChildren(attachmentElement);
policyRefElements.hasNext();) {
PolicyComponent policyRef = PolicyUtil
.getPolicyReferenceFromOMElement((OMElement)policyRefElements
.next());
policyComponents.add(policyRef);
}