int currLoc = 0;
while (iter.hasNext()) {
Association association = (Association) iter.next();
association.getSourceObject();
PublisherAssertion pa = ScoutJaxrUddiHelper.getPubAssertionFromJAXRAssociation(association);
sarr[currLoc] = pa;
currLoc++;
// Save PublisherAssertion
PublisherAssertions bd = null;
try {
bd = (PublisherAssertions) executeOperation(sarr, "SAVE_ASSOCIATION");
}
catch (RegistryException e) {
exceptions.add(new SaveException(e));
bulk.setExceptions(exceptions);
bulk.setStatus(JAXRResponse.STATUS_FAILURE);
return bulk;
}
if(bd != null)
{
List<PublisherAssertion> publisherAssertionList = bd.getPublisherAssertion();
PublisherAssertion[] keyarr = new PublisherAssertion[publisherAssertionList.size()];
publisherAssertionList.toArray(keyarr);
for (int i = 0; keyarr != null && i < keyarr.length; i++) {
PublisherAssertion result = (PublisherAssertion) keyarr[i];
KeyedReference keyr = result.getKeyedReference();
Concept c = new ConceptImpl(getRegistryService().getBusinessLifeCycleManager());
c.setName(new InternationalStringImpl(keyr.getKeyName()));
c.setKey( new KeyImpl(keyr.getTModelKey()) );
c.setValue(keyr.getKeyValue());
association.setAssociationType(c);