You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by "Cédric Bosdonnat (JIRA)" <ji...@apache.org> on 2012/06/11 14:15:43 UTC

[jira] [Commented] (CMIS-362) Cannot checkout documents from SharePoint 2010 repository using REST

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

Cédric Bosdonnat commented on CMIS-362:
---------------------------------------

After some tries for libcmis, I found out the following:

  * The URL needs to contain the objectId parameter. The CMIS specification is pretty vague on that aspect as it shouldn't be necessary, but it's still considered an input parameter in the Service description.
  * The content of the entry can be limited to the cmis:objectId property... in the way it is specified.

Here is a request that works properly for SharePoint 2010

POST /_vti_bin/cmis/rest/43036e79-ede2-4217-940c-009343f4439c?getCheckedoutDocs&objectId=3-1 HTTP/1.1
Host: XXX.XXX.XXX.XXX
Accept: */*
Content-Type:application/atom+xml;type=entry
Content-Length: 537

<?xml version="1.0"?>
<atom:entry xmlns:atom="http://www.w3.org/2005/Atom" xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200908/" xmlns:cmisra="http://docs.oasis-open.org/ns/cmis/restatom/200908/">
   <atom:title></atom:title>
   <atom:updated>2012-06-11T12:06:46Z</atom:updated>
   <cmisra:object>
      <cmis:properties>
         <cmis:propertyId propertyDefinitionId="cmis:objectId" localName="cmis:objectId" displayName="cmis:objectId" queryName="cmis:objectId"><cmis:value>3-1</cmis:value></cmis:propertyId>
      </cmis:properties>
   </cmisra:object>
</atom:entry>

I hope this may help.
                
> 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira