AnsweredAssumed Answered

Check out from C# Application through Webservice

Question asked by debakhuli on Oct 19, 2011
I want to check out a document from my C# application. For this, I have started coding as:

// Create the reference for the node selected
Alfresco.AuthoringWebService.Store spacesStore2 = new Alfresco.AuthoringWebService.Store();
spacesStore2.scheme = Alfresco.AuthoringWebService.StoreEnum.workspace;
spacesStore2.address = "SpacesStore";
Alfresco.AuthoringWebService.Reference reference1 = new Alfresco.AuthoringWebService.Reference();
reference1.store = spacesStore2;
reference1.uuid = node.id;
// To check out
Alfresco.AuthoringWebService.Predicate predicate = new Alfresco.AuthoringWebService.Predicate();
predicate.Items = new Object[] { reference };
Alfresco.AuthoringWebService.ParentReference pr = new Alfresco.AuthoringWebService.ParentReference();
pr.store = spacesStore2;
pr.uuid = this.currentReference.uuid;
pr.associationType = Constants.ASSOC_CONTAINS;
pr.childName = Constants.createQNameString(Constants.NAMESPACE_CONTENT_MODEL, name);                                               
this.authoringService.checkout(predicate, pr);


But the last line is not executed as showing an error "Object reference not set to an instance of an object". I couldn't able to find out the solution.
Please help me.

Outcomes