chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Lucas (JIRA)" <>
Subject [jira] [Commented] (CMIS-362) Cannot checkout documents from SharePoint 2010 repository using REST
Date Thu, 10 Jul 2014 19:09:04 GMT


Mike Lucas commented on CMIS-362:

I was encountering the same problem, and our Sharepoint 2010 repository is not working with
the CMIS Web Services binding -- only REST works. (Microsoft was unable to help.) So I did
not have the option to switch to Web Services like David Miller.

However, thanks to Cedric's comment I was able to create a custom Binding SPI Class (I called
it SharepointSpecificCmisAtomPubSpi), which uses a custom VersioningService. This custom VersioningService
extends the atompub VersioningServiceImpl but overrides the checkOut() method to add an additional
URL parameter of objectId.

This does the trick -- Sharepoint no longer returns a 400 error response with just 'documentId'
in the body, but instead successfully checks out the document with a 201 Created response.

Is anyone interested in the code? Note that because I am not modifying the OpenCmis source
code, I am using a BindingType of CUSTOM and supplying my own SPI and VersioningService implementations.
But I was thinking that OpenCmis could be include it as an option for the Atom Pub binding.
Something like SessionParameter.INCLUDE_OBJECTID_URL_PARAM_ON_CHECKOUT. This would address
this Sharepoint bug.

> Cannot checkout documents from SharePoint 2010 repository using REST
> --------------------------------------------------------------------
>                 Key: CMIS-362
>                 URL:
>             Project: Chemistry
>          Issue Type: Bug
>          Components: opencmis-client
>    Affects Versions: OpenCMIS 0.3.0
>            Reporter: David Miller
>            Assignee: Florian Müller
> Using Chemistry I can add a document to SharePoint 2010 via the AtomPub bindings.  Adding
the document gives me a Chemistry Document instance.  When I call checkOut() on this instance,
I get a "Bad Request" response (HTTP 400 status code), and the response body from SP 2010
is just the single word "documentId". The Chemistry exception is a CmisInvalidArgumentException.
> Does anybody have working code to checkout documents from SP2010?  I can't find any samples
> Thanks,
> Dave

This message was sent by Atlassian JIRA

View raw message