Hi Jonathan,
This is one of the few exceptions where the two CMIS bindings differ.
The Web Services binding accepts the version series id and the AtomPub
binding requires an object id.
OpenCMIS is spec compliant in this case and SharePoint seems not to be
compliant.
There is not much we can do on the OpenCMIS side - except for
introducing a "SharePoint mode", which is probably not a good idea.
The only (expensive) workaround is to get the version history. The first
entry in the list is the latest version.
Florian
On 04/05/2011 20:39, Jonathan Lee wrote:
Hi All,
Here is another issue related mounting a sharepoint 2010 repository.
Hopefully I can explain the problem clearly!
When I call document.getObjectOfLatestVersion(false), sharepoint returns the
following exception
*Microsoft.SharePoint.CMIS.Data.Exception.InvalidArgumentException: Item id
is invalid 458-1*
458-1 is the objectId of the document, however it will only work if you pass
in the versionSeriesId which is 458.
Basically,
This request won't work..
http://[server]/_vti_bin/cmis/rest/[repositoryId]?getObject&objectId=*458-1*
&filter=&includeAllowableActions=true&includeACL=false&returnVersion=latest
This will
http://[server]/_vti_bin/cmis/rest/[repositoryId]?getObject&objectId=*458*
&filter=&includeAllowableActions=true&includeACL=false&returnVersion=latest
However with SharePoint 2010 I cannot get an document object with only it's
versionSeriesId( ex. 458), I have to get the document with the objectId (
ex. 458-1). *session.getObject(458-1)*
So my question is. Is getObjectOfLatestVersion() using the versionSeriesId
of an object to send the request? To me it seems like its only using the
objectId to generate the request.
Is this something OpenCMIS can fix?
Thanks!!
Jonathan Lee