<?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: Adding an aspect to a comment node has error in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/adding-an-aspect-to-a-comment-node-has-error/m-p/77212#M24310</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;This&amp;nbsp;method works. The value&amp;nbsp;&lt;SPAN style="color: #0000ff; border: 0px; font-weight: inherit;"&gt;c6c9e3af-6e0b-46ad-8e11-648e1a27e7e6&lt;SPAN style="color: #000000; border: 0px; font-weight: inherit;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;is the comment node id. The comment must have been created already using a prior Rest API call.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&lt;BR /&gt;&lt;STRONG style="border: 0px; font-weight: bold;"&gt;HTTP PUT (for attaching aspect with its value to a comment node)&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff; border: 0px; font-weight: inherit;"&gt;&amp;lt;AlfrescoServerPort&amp;gt;/alfresco/api/-default-/public/alfresco/versions/1/nodes/c6c9e3af-6e0b-46ad-8e11-648e1a27e7e6&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&lt;STRONG style="border: 0px; font-weight: bold;"&gt;HTTP Body&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff; border: 0px; font-weight: inherit;"&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff; border: 0px; font-weight: inherit;"&gt;&amp;nbsp; "aspectNames":[&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff; border: 0px; font-weight: inherit;"&gt;&amp;nbsp; &amp;nbsp; "slo&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;perationInfo"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff; border: 0px; font-weight: inherit;"&gt;&amp;nbsp; ],&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff; border: 0px; font-weight: inherit;"&gt;&amp;nbsp; "properties": {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff; border: 0px; font-weight: inherit;"&gt;&amp;nbsp; &amp;nbsp; "slo&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;peration_user":"Goose",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff; border: 0px; font-weight: inherit;"&gt;&amp;nbsp; &amp;nbsp; "slo&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;peration_info":"A comment is added"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff; border: 0px; font-weight: inherit;"&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff; border: 0px; font-weight: inherit;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;In my code, I do like shown below. The variable&amp;nbsp;&lt;STRONG style="border: 0px; font-weight: bold;"&gt;restApiUrl&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;contains the PUT url as given above, and the variable&amp;nbsp;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;&lt;STRONG style="border: 0px; font-weight: bold;"&gt;jsonString&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;contains the above HttpBody Json content.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #808080; border: 0px; font-weight: inherit;"&gt;CloseableHttpResponse response = null;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #808080; border: 0px; font-weight: inherit;"&gt;URL restApiUrl = null;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #808080; border: 0px; font-weight: inherit;"&gt;CredentialsProvider provider = new BasicCredentialsProvider();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #808080; border: 0px; font-weight: inherit;"&gt;UsernamePasswordCredentials creds = new UsernamePasswordCredentials(this.configUser, this.configUserPassword);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #808080; border: 0px; font-weight: inherit;"&gt;provider.setCredentials(AuthScope.ANY, creds);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #808080; border: 0px; font-weight: inherit;"&gt;CloseableHttpClient httpClient = HttpClientBuilder.create().setDefaultCredentialsProvider(provider).build();&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #808080; border: 0px; font-weight: inherit;"&gt;HttpPut putFunction = new HttpPut(restApiUrl.toString());&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #808080; border: 0px; font-weight: inherit;"&gt;try {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #808080; border: 0px; font-weight: inherit;"&gt;&amp;nbsp; StringEntity entity = new StringEntity(jsonString);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #808080; border: 0px; font-weight: inherit;"&gt;&amp;nbsp; putFunction.setEntity(entity);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #808080; border: 0px; font-weight: inherit;"&gt;&amp;nbsp; putFunction.setHeader("Accept", "application/json");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #808080; border: 0px; font-weight: inherit;"&gt;&amp;nbsp; putFunction.setHeader("Content-type", "application/json");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #808080; border: 0px; font-weight: inherit;"&gt;&amp;nbsp; response = httpClient.execute(putFunction);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #808080; border: 0px; font-weight: inherit;"&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #808080; border: 0px; font-weight: inherit;"&gt;catch (Exception e) {}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #808080; border: 0px; font-weight: inherit;"&gt;finally {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #808080; border: 0px; font-weight: inherit;"&gt;if (response != null) { try { response.close(); } catch (Exception ignore) {} }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #808080; border: 0px; font-weight: inherit;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #000000; border: 0px; font-weight: inherit;"&gt;I see that this is a two call approach. First there is a Rest API call to create the comment (node). Then we have this Rest API call to attach/create the custom aspect.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #000000; border: 0px; font-weight: inherit;"&gt;For now, since this is purely user (navigation) action driven, there is only a remote possibility that it would pose scaling problem.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #000000; border: 0px; font-weight: inherit;"&gt;In future version of our application, I would certainly consider a Web Script approach, where I can achieve all this in a single call.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Sep 2018 18:47:31 GMT</pubDate>
    <dc:creator>sepgs2004</dc:creator>
    <dc:date>2018-09-27T18:47:31Z</dc:date>
    <item>
      <title>Adding an aspect to a comment node has error</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/adding-an-aspect-to-a-comment-node-has-error/m-p/77210#M24308</link>
      <description>I used google rest api client.&amp;nbsp;I wonder why this error. It appears that aspects are not allowed for comment nodes.Http Request PUTalfresco/api/-default-/public/alfresco/versions/1/nodes/19a82881-3d00-4b8a-8276-dc3d8237cda8/comments/c6c9e3af-6e0b-46ad-8e11-648e1a27e7e6JSON Body{ "aspectNames": [ "slo</description>
      <pubDate>Mon, 17 Sep 2018 20:23:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/adding-an-aspect-to-a-comment-node-has-error/m-p/77210#M24308</guid>
      <dc:creator>sepgs2004</dc:creator>
      <dc:date>2018-09-17T20:23:20Z</dc:date>
    </item>
    <item>
      <title>Re: Adding an aspect to a comment node has error</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/adding-an-aspect-to-a-comment-node-has-error/m-p/77211#M24309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried doing a PUT against a URL that refers to the comment node directly (without the /comments/) part? The GET you used to fetch the info for your comment looks much more like what I'd expect a PUT to work against. In a well-designed RESTful API you can often just change the HTTP method and the API behaves as you expect. The Alfresco 5.2 API is no different.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can do a GET using the comment's node reference to fetch info about the comment node:&lt;/P&gt;&lt;P&gt;GET&amp;nbsp;&lt;A class="link-titled" href="http://alfresco.local:8080/alfresco/api/-default-/public/alfresco/versions/1/nodes/f63ed651-9660-449c-9be6-9d751630863b" title="http://alfresco.local:8080/alfresco/api/-default-/public/alfresco/versions/1/nodes/f63ed651-9660-449c-9be6-9d751630863b" rel="nofollow noopener noreferrer"&gt;http://alfresco.local:8080/alfresco/api/-default-/public/alfresco/versions/1/nodes/f63ed651-9660-449c-9be6-9d751630863b&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And then you can do a PUT against the same URL to update it with a new aspect. In my case I added "cm&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;wnable" to a comment node and it worked fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PUT&amp;nbsp;&lt;A class="link-titled" href="http://alfresco.local:8080/alfresco/api/-default-/public/alfresco/versions/1/nodes/f63ed651-9660-449c-9be6-9d751630863b" title="http://alfresco.local:8080/alfresco/api/-default-/public/alfresco/versions/1/nodes/f63ed651-9660-449c-9be6-9d751630863b" rel="nofollow noopener noreferrer"&gt;http://alfresco.local:8080/alfresco/api/-default-/public/alfresco/versions/1/nodes/f63ed651-9660-449c-9be6-9d751630863b&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="string token"&gt;"aspectNames"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="string token"&gt;"cm:titled"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="string token"&gt;"cm:auditable"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="string token"&gt;"cm:ownable"&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&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;/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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Sep 2018 03:34:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/adding-an-aspect-to-a-comment-node-has-error/m-p/77211#M24309</guid>
      <dc:creator>jpotts</dc:creator>
      <dc:date>2018-09-18T03:34:11Z</dc:date>
    </item>
    <item>
      <title>Re: Adding an aspect to a comment node has error</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/adding-an-aspect-to-a-comment-node-has-error/m-p/77212#M24310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;This&amp;nbsp;method works. The value&amp;nbsp;&lt;SPAN style="color: #0000ff; border: 0px; font-weight: inherit;"&gt;c6c9e3af-6e0b-46ad-8e11-648e1a27e7e6&lt;SPAN style="color: #000000; border: 0px; font-weight: inherit;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;is the comment node id. The comment must have been created already using a prior Rest API call.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&lt;BR /&gt;&lt;STRONG style="border: 0px; font-weight: bold;"&gt;HTTP PUT (for attaching aspect with its value to a comment node)&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff; border: 0px; font-weight: inherit;"&gt;&amp;lt;AlfrescoServerPort&amp;gt;/alfresco/api/-default-/public/alfresco/versions/1/nodes/c6c9e3af-6e0b-46ad-8e11-648e1a27e7e6&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&lt;STRONG style="border: 0px; font-weight: bold;"&gt;HTTP Body&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff; border: 0px; font-weight: inherit;"&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff; border: 0px; font-weight: inherit;"&gt;&amp;nbsp; "aspectNames":[&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff; border: 0px; font-weight: inherit;"&gt;&amp;nbsp; &amp;nbsp; "slo&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;perationInfo"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff; border: 0px; font-weight: inherit;"&gt;&amp;nbsp; ],&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff; border: 0px; font-weight: inherit;"&gt;&amp;nbsp; "properties": {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff; border: 0px; font-weight: inherit;"&gt;&amp;nbsp; &amp;nbsp; "slo&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;peration_user":"Goose",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff; border: 0px; font-weight: inherit;"&gt;&amp;nbsp; &amp;nbsp; "slo&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;peration_info":"A comment is added"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff; border: 0px; font-weight: inherit;"&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff; border: 0px; font-weight: inherit;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;In my code, I do like shown below. The variable&amp;nbsp;&lt;STRONG style="border: 0px; font-weight: bold;"&gt;restApiUrl&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;contains the PUT url as given above, and the variable&amp;nbsp;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;&lt;STRONG style="border: 0px; font-weight: bold;"&gt;jsonString&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;contains the above HttpBody Json content.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #808080; border: 0px; font-weight: inherit;"&gt;CloseableHttpResponse response = null;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #808080; border: 0px; font-weight: inherit;"&gt;URL restApiUrl = null;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #808080; border: 0px; font-weight: inherit;"&gt;CredentialsProvider provider = new BasicCredentialsProvider();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #808080; border: 0px; font-weight: inherit;"&gt;UsernamePasswordCredentials creds = new UsernamePasswordCredentials(this.configUser, this.configUserPassword);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #808080; border: 0px; font-weight: inherit;"&gt;provider.setCredentials(AuthScope.ANY, creds);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #808080; border: 0px; font-weight: inherit;"&gt;CloseableHttpClient httpClient = HttpClientBuilder.create().setDefaultCredentialsProvider(provider).build();&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #808080; border: 0px; font-weight: inherit;"&gt;HttpPut putFunction = new HttpPut(restApiUrl.toString());&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #808080; border: 0px; font-weight: inherit;"&gt;try {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #808080; border: 0px; font-weight: inherit;"&gt;&amp;nbsp; StringEntity entity = new StringEntity(jsonString);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #808080; border: 0px; font-weight: inherit;"&gt;&amp;nbsp; putFunction.setEntity(entity);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #808080; border: 0px; font-weight: inherit;"&gt;&amp;nbsp; putFunction.setHeader("Accept", "application/json");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #808080; border: 0px; font-weight: inherit;"&gt;&amp;nbsp; putFunction.setHeader("Content-type", "application/json");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #808080; border: 0px; font-weight: inherit;"&gt;&amp;nbsp; response = httpClient.execute(putFunction);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #808080; border: 0px; font-weight: inherit;"&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #808080; border: 0px; font-weight: inherit;"&gt;catch (Exception e) {}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #808080; border: 0px; font-weight: inherit;"&gt;finally {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #808080; border: 0px; font-weight: inherit;"&gt;if (response != null) { try { response.close(); } catch (Exception ignore) {} }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #808080; border: 0px; font-weight: inherit;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #000000; border: 0px; font-weight: inherit;"&gt;I see that this is a two call approach. First there is a Rest API call to create the comment (node). Then we have this Rest API call to attach/create the custom aspect.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #000000; border: 0px; font-weight: inherit;"&gt;For now, since this is purely user (navigation) action driven, there is only a remote possibility that it would pose scaling problem.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #727174; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #000000; border: 0px; font-weight: inherit;"&gt;In future version of our application, I would certainly consider a Web Script approach, where I can achieve all this in a single call.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Sep 2018 18:47:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/adding-an-aspect-to-a-comment-node-has-error/m-p/77212#M24310</guid>
      <dc:creator>sepgs2004</dc:creator>
      <dc:date>2018-09-27T18:47:31Z</dc:date>
    </item>
  </channel>
</rss>

