String targetKey = asi.getToKey();
Collection<Key> orgcol = new ArrayList<Key>();
orgcol.add(new KeyImpl(sourceKey));
orgcol.add(new KeyImpl(targetKey));
BulkResponse bl = getRegistryObjects(orgcol, LifeCycleManager.ORGANIZATION);
Association asso = ScoutUddiJaxrHelper.getAssociation(bl.getCollection(),
registryService.getBusinessLifeCycleManager());
//Set Confirmation
((AssociationImpl)asso).setConfirmedBySourceOwner(caller);
((AssociationImpl)asso).setConfirmedByTargetOwner(other);
if(confirm != Constants.COMPLETION_STATUS_COMPLETE)
((AssociationImpl)asso).setConfirmed(false);
Concept c = new ConceptImpl(getRegistryService().getBusinessLifeCycleManager());
KeyedReference keyr = asi.getKeyedReference();
c.setKey(new KeyImpl(keyr.getTModelKey()));
c.setName(new InternationalStringImpl(keyr.getKeyName()));
c.setValue(keyr.getKeyValue());
asso.setKey(new KeyImpl(keyr.getTModelKey())); //TODO:Validate this
asso.setAssociationType(c);
col.add(asso);
}
return new BulkResponseImpl(col);