AnsweredAssumed Answered

ObjectService.getContentStream --> InvalidNodeRefException

Question asked by ldblanchet on Apr 12, 2011

I am fairly new to Alfresco in general. I am currently learning the web services. I am trying to download a file I added in Alfresco using the web services, but I get the following error when calling the method getContentStream : "Runtime error. Message: org.alfresco.service.cmr.repository.InvalidNodeRefException: Node does not exist: store://2011/4/12/9/23/04ea1e63-604f-4849-86e7-791c1d67cecd.bin"

Here is what I do :
1 - I get my repository information using the RepositoryService. this gives me the repositoryId and rootFolderId
2 - I call getDescendants on the Navigation service, using the ids I found just above. This gives me many objects, including the one I am trying to download. I get the objectId, the contentStreamId and the contentStreamLength

now I try to perform

"cmisContentStreamType cmisStream = objServ.getContentStream(mainRepoInfo.repositoryId, objectId, streamId, "0", contentLength, objExtensionType);"

This fails with the error I mentionned above and I don't understand why. The contentStreamId is like this : "store://2011/4/12/9/23/04ea1e63-604f-4849-86e7-791c1d67cecd.bin"

This seems to map to a file on the Alfresco server : D:\Alfresco\alf_data\contentstore\2011\4\12\9\23\04ea1e63-604f-4849-86e7-791c1d67cecd.bin, this file exists.

Does anyone know why this method would fail with the error I am getting?

(I am using Alfresco community 3.4)
thank you!