<?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 Alfresco CMIS Web Scripts API for 'getContent' by path is not working in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/alfresco-cmis-web-scripts-api-for-getcontent-by-path-is-not/m-p/304399#M257529</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I had read&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.alfresco.com/forum/developer-discussions/alfresco-api/cmis-getcontent-example-09262012-1805" rel="nofollow noopener noreferrer"&gt;http://forums.alfresco.com/forum/developer-discussions/alfresco-api/cmis-getcontent-example-09262012-1805&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;but did not find an OpenCMIS services URI / sample of how to fetch node content by providing it's path only, not it's UUID.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;strong&amp;gt;The problem:&amp;lt;/strong&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a file in my Alfresco (4.1.5) repository of which I want to read the content through the Alfresco services REST API. For the lookup, I want to use the file path, not the UUID. However, the lookup by path does not work, only the lookup by UUID works. I cannot find the mistake.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the file path:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;strong&amp;gt;DisplayPath &amp;amp; File Name:&amp;lt;/strong&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;/Company Home/Data Dictionary/Cleaner Configs/cleaner.properties&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;strong&amp;gt;QNamePath:&amp;lt;/strong&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;/app:company_home/app:dictionary/cm:Cleaner_x0020_Configs/cm:cleaner.properties&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Lookup by UUID works with the following REST API url:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;A href="http://localhost:8080/alfresco/service/cmis/i/2391adf9-365c-4959-bf30-8f001154c100/content" rel="nofollow noopener noreferrer"&gt;http://localhost:8080/alfresco/service/cmis/i/2391adf9-365c-4959-bf30-8f001154c100/content&lt;/A&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, lookup by path only does not work. Neither with the primary path nor the display path:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;A href="http://localhost:8080/alfresco/service/cmis/p/app:company_home/app:dictionary/cm:Cleaner_x0020_Configs/cm:cleaner.properties/content?a=false" rel="nofollow noopener noreferrer"&gt;http://localhost:8080/alfresco/service/cmis/p/app:company_home/app:dictionary/cm:Cleaner_x0020_Configs/cm:cleaner.properties/content?a=false&lt;/A&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;A href="http://localhost:8080/alfresco/service/cmis/p/Company%20Home/Data%20Dictionary/Cleaner%20Configs/cleaner.properties/content?a=false" rel="nofollow noopener noreferrer"&gt;http://localhost:8080/alfresco/service/cmis/p/Company%20Home/Data%20Dictionary/Cleaner%20Configs/cleaner.properties/content?a=false&lt;/A&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am getting a 404 error in both cases:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;blockquote&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Message:&amp;nbsp;&amp;nbsp;&amp;nbsp; 10080001 Unable to find ObjectPathReference[storeRef=workspace://SpacesStore,path=/app:company_home/app:company_home/app:dictionary/cm:Cleaner_x0020_Configs/cm:cleaner.properties]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Exception:&amp;nbsp; org.springframework.extensions.webscripts.WebScriptException - 10080001 Unable to find ObjectPathReference[storeRef=workspace://SpacesStore,path=/app:company_home/app:company_home/app:dictionary/cm:Cleaner_x0020_Configs/cm:cleaner.properties]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/blockquote&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;strong&amp;gt;Reference:&amp;lt;/strong&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://wiki.alfresco.com/wiki/CMIS_Web_Scripts_Reference#Get_Content_.28getContent.29" rel="nofollow noopener noreferrer"&gt;http://wiki.alfresco.com/wiki/CMIS_Web_Scripts_Reference#Get_Content_.28getContent.29&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;blockquote&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Gets the content stream for the specified document, or gets a rendition stream for a specified rendition of a document.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;GET /alfresco/service/cmis/p{path}/content{property}?a={attach?}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/blockquote&amp;gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Nov 2013 09:10:34 GMT</pubDate>
    <dc:creator>mathias_lin</dc:creator>
    <dc:date>2013-11-08T09:10:34Z</dc:date>
    <item>
      <title>Alfresco CMIS Web Scripts API for 'getContent' by path is not working</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/alfresco-cmis-web-scripts-api-for-getcontent-by-path-is-not/m-p/304399#M257529</link>
      <description>I had readhttp://forums.alfresco.com/forum/developer-discussions/alfresco-api/cmis-getcontent-example-09262012-1805but did not find an OpenCMIS services URI / sample of how to fetch node content by providing it's path only, not it's UUID.&amp;lt;strong&amp;gt;The problem:&amp;lt;/strong&amp;gt;I have a file in my A</description>
      <pubDate>Fri, 08 Nov 2013 09:10:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/alfresco-cmis-web-scripts-api-for-getcontent-by-path-is-not/m-p/304399#M257529</guid>
      <dc:creator>mathias_lin</dc:creator>
      <dc:date>2013-11-08T09:10:34Z</dc:date>
    </item>
    <item>
      <title>Re: Alfresco CMIS Web Scripts API for 'getContent' by path is not working</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/alfresco-cmis-web-scripts-api-for-getcontent-by-path-is-not/m-p/304400#M257530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Seems like the root of your path is too high up the hierarchy. That's why you see company_home appear twice in your error message.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Try to remove the company_home part like such:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://localhost:8081/alfresco/service/cmis/p/Data%20Dictionary/Cleaner%20Configs/cleaner.properties/content?a=false" rel="nofollow noopener noreferrer"&gt;http://localhost:8081/alfresco/service/cmis/p/Data%20Dictionary/Cleaner%20Configs/cleaner.properties/content?a=false&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Nov 2013 10:04:36 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/alfresco-cmis-web-scripts-api-for-getcontent-by-path-is-not/m-p/304400#M257530</guid>
      <dc:creator>arnoldschrijve1</dc:creator>
      <dc:date>2013-11-08T10:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: Alfresco CMIS Web Scripts API for 'getContent' by path is not working</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/alfresco-cmis-web-scripts-api-for-getcontent-by-path-is-not/m-p/304401#M257531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;And use 8080 of course (I tested against my own alfresco repo on 8081 &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Nov 2013 10:05:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/alfresco-cmis-web-scripts-api-for-getcontent-by-path-is-not/m-p/304401#M257531</guid>
      <dc:creator>arnoldschrijve1</dc:creator>
      <dc:date>2013-11-08T10:05:39Z</dc:date>
    </item>
    <item>
      <title>Re: Alfresco CMIS Web Scripts API for 'getContent' by path is not working</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/alfresco-cmis-web-scripts-api-for-getcontent-by-path-is-not/m-p/304402#M257532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Cmis's root / is mapped to /app:company_home,so /Data%20Dictionary is automaticlly mapped to /app:company_home/Data%20Dictionary.you should not prefix it with /app:company_home,or it'll be interpretered to /app:company_home/app:company_home/Data%20Dictionary which will be not found .&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;And using cmis you can only access nodes under /app:company_home.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Nov 2013 02:39:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/alfresco-cmis-web-scripts-api-for-getcontent-by-path-is-not/m-p/304402#M257532</guid>
      <dc:creator>kaynezhang</dc:creator>
      <dc:date>2013-11-10T02:39:47Z</dc:date>
    </item>
    <item>
      <title>Re: Alfresco CMIS Web Scripts API for 'getContent' by path is not working</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/alfresco-cmis-web-scripts-api-for-getcontent-by-path-is-not/m-p/304403#M257533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;How can I obtain a display path from the Alfresco API? (without qnames)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I want the path of a node, I do the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;getNodeService().getPath(nodeRef)&lt;BR /&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;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It returns something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;blockcode&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;A href="http://www.alfresco.org/model/application/1.0}company_home/{http://www.alfresco.org/model/application/1.0}user_homes/{http://www.alfresco.org/model/content/1.0}AGP/{http://www.alfresco.org/model/content/1.0}AGP2/{http://www.alfresco.org/model/content/1.0}New_x0020_Documents/{http://www.alfresco.org/model/content/1.0}Test.pdf" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/model/application/1.0}company_home/{http://www.alfresco.org/model/application/1.0}user_homes/{http://www.alfresco.org/model/content/1.0}AGP/{http://www.alfresco.org/model/content/1.0}AGP2/{http://www.alfresco.org/model/content/1.0}New_x0020_Documents/{http://www.alfresco.org/model/content/1.0}Test.pdf&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/blockcode&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But I want a path like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;blockcode&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;/company_home/User Homes/AGP/AGP2/New Documents/Test.pdf&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/blockcode&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Without the qnames, types, and with the correct format without _x0020_ codes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Are there a method from the Alfresco API to get this type of path? Or I must decode it writing an own method in Java?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;PD: I answer myself… &lt;img id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://connect.hyland.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;getNodeService().getPath(nodeRef).toDisplayPath(getNodeService(), getPermissionService()&lt;BR /&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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 10:57:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/alfresco-cmis-web-scripts-api-for-getcontent-by-path-is-not/m-p/304403#M257533</guid>
      <dc:creator>spilby</dc:creator>
      <dc:date>2014-05-30T10:57:00Z</dc:date>
    </item>
  </channel>
</rss>

