AnsweredAssumed Answered

Connectivity from C# Application through Webservice

Question asked by debakhuli on Oct 19, 2011
Suppose I have two directories named:
/app:company_home/cm:Office1
And /app:company_home/cm:Office2

And there is a document named abc.pdf in Office1 Directory. Now I want to move the document from Office1 to Office2 from my customized C# Application through Webservice.
For this, I have started coding like this:

String newParentDir = "/app:company_home/cm:Office1 ";
Alfresco.ContentWebService.ParentReference folderParentRef = new Alfresco.ContentWebService.ParentReference();
folderParentRef.setStore(storeRef);
folderParentRef.setPath(newParentDir);                                            folderParentRef.setAssociationType(Constants.ASSOC_CONTAINS);
// create ref to current dir
String currentDir = "/app:company_home/cm:Office2";
Reference curr = new Reference();
curr.setStore(storeRef);
curr.setPath(currentDir);
CMLMove move = new CMLMove();                                            move.setAssociationType(Constants.ASSOC_CONTAINS);
move.setChildName("productDetails");
move.setTo(folderParentRef);
move.setWhere(new Predicate(new Reference[] { curr }, null, null));
CML cml = new CML();
cml.setMove(new CMLMove[] { move });                                            WebServiceFactory.getRepositoryService().update(cml);

But the code is not working as there is lot of errors. I couldn’t able to understand the actual way to do this. Can anybody help me out?
Thanks in advance.

Outcomes