CmisInvalidArgumentException when downloading Private Working Copy from Alfresco via CMIS -


my open-source app downloads files of alfresco folder (by cmis).
algorithm simple:

  1. list content of folder folder.getchildren()
  2. download each document.getcontentstream()

it works fine, except folders contain working copy of file, in case alfresco says:

org.apache.chemistry.opencmis.commons.exceptions.cmisinvalidargumentexception: stream id invalid: workspace://spacesstore/8b9a58ba-652f-4a18-8d26-aba06df98d25;pwc     @ org.alfresco.opencmis.cmisconnector.getcontentstream(cmisconnector.java:1199)     @ org.alfresco.opencmis.alfrescocmisserviceimpl.getcontentstream(alfrescocmisserviceimpl.java:1795)     @ sun.reflect.generatedmethodaccessor700.invoke(unknown source) 

the ;pwc means "private working copy", special case in cmis protocol. working copies created when alfresco share user clicks "edit offline" on document (aka check out/check in).

is algorithm flawed? or bug in alfresco/opencmis?

i'm not sure of details, don't paste here code triggers exception , don't mention chemistry version you're using. anyway, if run following groovy code within cmis workbench v0.8.0 print files contents:

def obj = session.getobjectbypath("/cc"); def children = obj.getchildren(); (doc in children) {   def s = doc.getcontentstream();   def = s.getstream();   println(i.text); } 

the cc folder used above 1 created in alfresco cmis instance, put file , checked out create pwc. assume there issue code, above code uses same api.


Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

java.lang.NoClassDefFoundError When Creating New Android Project -

Decoding a Python 2 `tempfile` with python-future -