HiI am trying to create peer association between two nodes . Following is my code try
{
Predicate predicate_epubFile=new Predicate(new Reference[]{ref_epubFile},storeRef, null);
Predicate predicate_epubCoverImage=new Predicate(new Reference[]{ref_epubImage},storeRef,null);
CMLCreateAssociation createAssociation=new CMLCreateAssociation(predicate_epubFile,null,predicate_epubCoverImage,null,Constants.ASSOC_CONTAINS);
cml = new CML();
cml.setCreateAssociation(new CMLCreateAssociation[]{createAssociation});
WebServiceFactory.getRepositoryService().update(cml);
}
catch(RepositoryFault e)
{
e.getMessage();
}This is Giving following Exceptionorg.alfresco.repo.node.integrity.IntegrityException: 01010388 Found 1 integrity violations:
The association source type is incorrect:
Source Node: workspace://SpacesStore/27aedefe-eeb9-45d3-a0b8-99c8cd8b7941
Association: Association[ class=ClassDef[name={http://www.alfresco.org/model/content/1.0}folder], name={http://www.alfresco.org/model/content/1.0}contains, target class={http://www.alfresco.org/model/system/1.0}base, source role=null, target role=null]
Required Source Type: {http://www.alfresco.org/model/content/1.0}folder
Actual Source Type: {http://www.alfresco.org/model/content/1.0}contentWhat i am doing wrong here.Please help Thank youAnshul