chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Lucas (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CMIS-362) Cannot checkout documents from SharePoint 2010 repository using REST
Date Mon, 14 Jul 2014 15:34:05 GMT

    [ https://issues.apache.org/jira/browse/CMIS-362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14060765#comment-14060765
] 

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
0.11.0.

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

{code:title=VersioningServiceImpl.java|borderStyle=solid}
        UrlBuilder url = new UrlBuilder(link);
        // check to see if we should add objectId as a URL Param (useful for Sharepoint 2010
REST/AtomPub - see https://issues.apache.org/jira/browse/CMIS-362) 
        // 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());
        }
{code}

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: https://issues.apache.org/jira/browse/CMIS-362
>             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
online.
> Thanks,
> Dave



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message