<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: REST - Can't get checkout to work in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/rest-can-t-get-checkout-to-work/m-p/249705#M202835</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Old thread, but thought I'd respond anyway as multiple people have asked me for this info lately…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The three ingredients to successfully checking out a doc via CMIS and the restful Atom Pub binding are:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Posting to the correct "checkedout" URL, which is: &lt;/SPAN&gt;&lt;A href="http://localhost:8080/alfresco/s/cmis/checkedout" rel="nofollow noopener noreferrer"&gt;http://localhost:8080/alfresco/s/cmis/checkedout&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Setting the correct content-type in the header, which is: 'content-type:application/atom+xml;type=entry'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. Posting the appropriately formatted Atom entry to the collection. An example appears below:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;?xml version="1.0" ?&amp;gt;&lt;BR /&gt;&amp;lt;entry xmlns="&lt;A href="http://www.w3.org/2005/Atom" rel="nofollow noopener noreferrer"&gt;http://www.w3.org/2005/Atom&lt;/A&gt;" xmlns:app="&lt;A href="http://www.w3.org/2007/app" rel="nofollow noopener noreferrer"&gt;http://www.w3.org/2007/app&lt;/A&gt;" xmlns:cmisra="&lt;A href="http://docs.oasis-open.org/ns/cmis/restatom/200908/" rel="nofollow noopener noreferrer"&gt;http://docs.oasis-open.org/ns/cmis/restatom/200908/&lt;/A&gt;"&amp;gt;&lt;BR /&gt;&amp;lt;cmisra:object xmlns:cmis="&lt;A href="http://docs.oasis-open.org/ns/cmis/core/200908/" rel="nofollow noopener noreferrer"&gt;http://docs.oasis-open.org/ns/cmis/core/200908/&lt;/A&gt;"&amp;gt;&lt;BR /&gt;&amp;lt;cmis:properties&amp;gt;&lt;BR /&gt;&amp;lt;cmis:propertyId propertyDefinitionId="cmis:objectId"&amp;gt;&lt;BR /&gt;&amp;lt;cmis:value&amp;gt;workspace://SpacesStore/81d28461-58a9-4a23-a49c-97db9a518040&amp;lt;/cmis:value&amp;gt;&lt;BR /&gt;&amp;lt;/cmis:propertyId&amp;gt;&lt;BR /&gt;&amp;lt;/cmis:properties&amp;gt;&lt;BR /&gt;&amp;lt;/cmisra:object&amp;gt;&lt;BR /&gt;&amp;lt;/entry&amp;gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Assuming the XML was in a file called test.xml, you could use the following curl command to check out the document:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;curl -X POST -uadmin:admin -H 'content-type:application/atom+xml;type=entry' '&lt;/SPAN&gt;&lt;A href="http://localhost:8080/alfresco/s/cmis/checkedout" rel="nofollow noopener noreferrer"&gt;http://localhost:8080/alfresco/s/cmis/checkedout&lt;/A&gt;&lt;SPAN&gt;' -d@/Users/jpotts/Desktop/test.xml&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I suppose a key fourth ingredient is that the document's "canCheckOut" allowable action is returning true before the checkout is attempted.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Nov 2011 20:59:12 GMT</pubDate>
    <dc:creator>jpotts</dc:creator>
    <dc:date>2011-11-23T20:59:12Z</dc:date>
    <item>
      <title>REST - Can't get checkout to work</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/rest-can-t-get-checkout-to-work/m-p/249702#M202832</link>
      <description>I'm developing a CMIS client for retrieving information from multiple back ends. The client is written in Java, but does not use any frameworks like OpenCMIS, etc. I'm simply using the repository information to generate HTTP requests for the various services.I'm having trouble getting the checkout s</description>
      <pubDate>Wed, 19 Jan 2011 22:36:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/rest-can-t-get-checkout-to-work/m-p/249702#M202832</guid>
      <dc:creator>tdinger</dc:creator>
      <dc:date>2011-01-19T22:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: REST - Can't get checkout to work</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/rest-can-t-get-checkout-to-work/m-p/249703#M202833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Could you please post your code for this issue?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Feb 2011 19:49:59 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/rest-can-t-get-checkout-to-work/m-p/249703#M202833</guid>
      <dc:creator>seanlon11</dc:creator>
      <dc:date>2011-02-07T19:49:59Z</dc:date>
    </item>
    <item>
      <title>Re: REST - Can't get checkout to work</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/rest-can-t-get-checkout-to-work/m-p/249704#M202834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It's not really a "code" issue, since I'm just trying to make the HTTP request against the alfresco server. I'm using REST Client in Firefox to make the request.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyway it's working now for the same request, so I'd assume a fix was added to the public Alfresco server.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Feb 2011 18:09:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/rest-can-t-get-checkout-to-work/m-p/249704#M202834</guid>
      <dc:creator>tdinger</dc:creator>
      <dc:date>2011-02-08T18:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: REST - Can't get checkout to work</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/rest-can-t-get-checkout-to-work/m-p/249705#M202835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Old thread, but thought I'd respond anyway as multiple people have asked me for this info lately…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The three ingredients to successfully checking out a doc via CMIS and the restful Atom Pub binding are:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Posting to the correct "checkedout" URL, which is: &lt;/SPAN&gt;&lt;A href="http://localhost:8080/alfresco/s/cmis/checkedout" rel="nofollow noopener noreferrer"&gt;http://localhost:8080/alfresco/s/cmis/checkedout&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Setting the correct content-type in the header, which is: 'content-type:application/atom+xml;type=entry'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. Posting the appropriately formatted Atom entry to the collection. An example appears below:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;?xml version="1.0" ?&amp;gt;&lt;BR /&gt;&amp;lt;entry xmlns="&lt;A href="http://www.w3.org/2005/Atom" rel="nofollow noopener noreferrer"&gt;http://www.w3.org/2005/Atom&lt;/A&gt;" xmlns:app="&lt;A href="http://www.w3.org/2007/app" rel="nofollow noopener noreferrer"&gt;http://www.w3.org/2007/app&lt;/A&gt;" xmlns:cmisra="&lt;A href="http://docs.oasis-open.org/ns/cmis/restatom/200908/" rel="nofollow noopener noreferrer"&gt;http://docs.oasis-open.org/ns/cmis/restatom/200908/&lt;/A&gt;"&amp;gt;&lt;BR /&gt;&amp;lt;cmisra:object xmlns:cmis="&lt;A href="http://docs.oasis-open.org/ns/cmis/core/200908/" rel="nofollow noopener noreferrer"&gt;http://docs.oasis-open.org/ns/cmis/core/200908/&lt;/A&gt;"&amp;gt;&lt;BR /&gt;&amp;lt;cmis:properties&amp;gt;&lt;BR /&gt;&amp;lt;cmis:propertyId propertyDefinitionId="cmis:objectId"&amp;gt;&lt;BR /&gt;&amp;lt;cmis:value&amp;gt;workspace://SpacesStore/81d28461-58a9-4a23-a49c-97db9a518040&amp;lt;/cmis:value&amp;gt;&lt;BR /&gt;&amp;lt;/cmis:propertyId&amp;gt;&lt;BR /&gt;&amp;lt;/cmis:properties&amp;gt;&lt;BR /&gt;&amp;lt;/cmisra:object&amp;gt;&lt;BR /&gt;&amp;lt;/entry&amp;gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Assuming the XML was in a file called test.xml, you could use the following curl command to check out the document:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;curl -X POST -uadmin:admin -H 'content-type:application/atom+xml;type=entry' '&lt;/SPAN&gt;&lt;A href="http://localhost:8080/alfresco/s/cmis/checkedout" rel="nofollow noopener noreferrer"&gt;http://localhost:8080/alfresco/s/cmis/checkedout&lt;/A&gt;&lt;SPAN&gt;' -d@/Users/jpotts/Desktop/test.xml&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I suppose a key fourth ingredient is that the document's "canCheckOut" allowable action is returning true before the checkout is attempted.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Nov 2011 20:59:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/rest-can-t-get-checkout-to-work/m-p/249705#M202835</guid>
      <dc:creator>jpotts</dc:creator>
      <dc:date>2011-11-23T20:59:12Z</dc:date>
    </item>
  </channel>
</rss>

