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 Mon, 14 Jul 2014 15:34:05 GMT


Mike Lucas commented on CMIS-362:

Thanks Florian. Since I wasn't modifying the Chemistry code, I created a custom extension
of {{org.apache.chemistry.opencmis.client.bindings.spi.atompub.VersioningServiceImpl}}, but
my guess is you would probably just modify that class directly. Note I am working with version

In method {{checkOut()}}, replace line 76 with:

        UrlBuilder url = new UrlBuilder(link);
        // check to see if we should add objectId as a URL Param (useful for Sharepoint 2010
REST/AtomPub - see 
        // TODO INCLUDE_OBJECTID_URL_PARAM_ON_CHECKOUT should be added as a constant to SessionParameter
        if ("true".equalsIgnoreCase( (String) getSession().get("INCLUDE_OBJECTID_URL_PARAM_ON_CHECKOUT",
"false") )) {
        	// TODO "objectId" should use a constant (probably exists already in chemistry somewhere...
        	url.addParameter("objectId", objectId.getValue());

Then to drive this behavior I just set the INCLUDE_OBJECTID_URL_PARAM_ON_CHECKOUT to "true"
when setting up the session.

> 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