You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by "David Miller (JIRA)" <ji...@apache.org> on 2011/05/03 20:54:03 UTC

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

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


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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

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

Posted by "David Miller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CMIS-362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13029295#comment-13029295 ] 

David Miller commented on CMIS-362:
-----------------------------------

Versioning is enabled: I can add a document via OpenCMIS with VersionState.MAJOR, and using the SP user interface, I can publish major or minor versions.

Yesterday I enumerated the allowable actions on my OpenCMIS-added documents, and CAN_CHECKOUT was in the list.

We configured our SharePoint to allow replacing the content stream without checking out first.  Now, using OpenCMIS, I can set the content stream, and this results in a checkout (in SharePoint UI, on the Version History dialog, I see a new minor version).  However, I can't checkin; I get the same Bad Request I do for checkout.

Also, using Wireshark I found the Atom message OpenCMIS sends to SharePoint.  Using the Firefox REST Client, I send the same message, and get the same Bad Request.  In experimenting with the message, I found I can send any payload - invalid XML, or even an empty payload - and I always get the same "Bad Request" response from SP.

Also, I pointed the CMIS Workbench to my SharePoint repository, and after selecting a repository and logging in, I see an error: "CmisRuntimeException: Property 'cmis:contentStreamFileName' doesn't exist!"  Does that tell you anything useful?

Thanks,
Dave



> 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
>
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

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

Posted by "David Miller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CMIS-362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13047332#comment-13047332 ] 

David Miller commented on CMIS-362:
-----------------------------------

Florian,

I got some information from MS Support.  They sent me a URL you can send to SP2010's REST service (no payload needed) to check out a document:

http:// <ServerName>/_vti_bin/cmis/rest/99763AC1-ABB2-453F-A752-9D6A7E0AA33B?getCheckedoutDocs&repositoryId=99763AC1-ABB2-453F-A752-9D6A7E0AA33B&orderby=Id&objectId=1-2560

Where the GUID is the SP2010 repository ID.  The orderby is not required, but doesn't hurt.  

Thanks,
Dave



> 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
>
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

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

Posted by "Florian Müller (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CMIS-362?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Florian Müller resolved CMIS-362.
---------------------------------

    Resolution: Won't Fix
      Assignee: Florian Müller

> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

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

Posted by "David Miller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CMIS-362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13049419#comment-13049419 ] 

David Miller commented on CMIS-362:
-----------------------------------

OK.  I am following up with my support contact as to whether (a) Microsoft believes it is spec-compliant; and (b) if they agree it is *not* compliant, whether they intend to ever address the issue.

Thanks,
Dave



> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

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

Posted by "Florian Müller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CMIS-362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13049407#comment-13049407 ] 

Florian Müller commented on CMIS-362:
-------------------------------------

Thanks for sharing your findings, Dave.
I'm afraid there is not much we can do. There is no <cmis:objectId> tag in the CMIS specification. Supporting this would be more than just a small workaround.

I'll close this issue. The recommendation for now is to use the Web Services binding.


> 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
>
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

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

Posted by "David Miller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CMIS-362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13049367#comment-13049367 ] 

David Miller commented on CMIS-362:
-----------------------------------

>From MS Support, here is a working Atom request to checkout an SP2010 document:

<?xml version='1.0' encoding='UTF-8'?> 
<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:id>urn:uuid:00000000-0000-0000-0000-00000000000</atom:id>   
	<atom:title></atom:title>  
	<atom:updated>2011-05-03T15:23:45Z</atom:updated>   
	<cmisra:object xmlns:ns3='http://docs.oasis-open.org/ns/cmis/messaging/200908/'>   
		<cmis:objectId>1-3584</cmis:objectId>  
	</cmisra:object>  
</atom:entry>

The above request works against SP2010.  The request sent by OpenCMIS (which does not work against SP2010) is as follows:

<?xml version='1.0' encoding='UTF-8'?> 
<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:id>urn:uuid:00000000-0000-0000-0000-00000000000</atom:id>   
	<atom:title></atom:title>  
	<atom:updated>2011-05-03T15:23:45Z</atom:updated>   
	<cmisra:object xmlns:ns3='http://docs.oasis-open.org/ns/cmis/messaging/200908/'>   
		<cmis:properties>  
			<cmis:propertyId propertyDefinitionId='cmis:objectId'>  
				<cmis:value>1-3584</cmis:value>  
			</cmis:propertyId>  
		</cmis:properties>  
	</cmisra:object>  
</atom:entry>

Hopefully this may be of some use to you in terms of working with SP2010 via REST.  As for my project, we will probably switch to the WSDL bindings, since the OpenCMIS WSDL binding seems to work as-is.

Thanks,
Dave



> 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
>
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Posted by "Florian Müller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CMIS-362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13029101#comment-13029101 ] 

Florian Müller commented on CMIS-362:
-------------------------------------

Is versioning enabled for this document library? Do the allowable actions allow a check out?

> 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
>
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

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

Posted by "Cédric Bosdonnat (JIRA)" <ji...@apache.org>.
    [ 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