<?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 Set the editor source for a model in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/set-the-editor-source-for-a-model/m-p/155131#M109506</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;I'm traying to "Set the editor source for a model" like the documentation indicate me on the web. I have to do this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;PUT repository/models/{modelId}/source&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Request body: The request should be of type multipart/form-data. There should be a single file-part included with the binary value of the source. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't understand how to send the body, what is exactly the body? Can anybody help me pls?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My questions:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Wha should I to send it to the service? how? I am trying from Java. Can you give an example?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Feb 2014 04:22:27 GMT</pubDate>
    <dc:creator>gahospin</dc:creator>
    <dc:date>2014-02-13T04:22:27Z</dc:date>
    <item>
      <title>Set the editor source for a model</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/set-the-editor-source-for-a-model/m-p/155131#M109506</link>
      <description>Hi,I'm traying to "Set the editor source for a model" like the documentation indicate me on the web. I have to do this&lt;IMG id="smileytongue" class="emoticon emoticon-smileytongue" src="https://migration33.stage.lithium.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;UT repository/models/{modelId}/sourceand:Request body: The request should be of type multipart/form-data. There should be a single file-part included with the binary value of the s</description>
      <pubDate>Thu, 13 Feb 2014 04:22:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/set-the-editor-source-for-a-model/m-p/155131#M109506</guid>
      <dc:creator>gahospin</dc:creator>
      <dc:date>2014-02-13T04:22:27Z</dc:date>
    </item>
    <item>
      <title>Re: Set the editor source for a model</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/set-the-editor-source-for-a-model/m-p/155132#M109507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks guys,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can resolve it. Here my solution:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ClientRequest add_request = new ClientRequest("&lt;/SPAN&gt;&lt;A href="http://localhost:9191/activiti-rest/service/repository/models/6852/source" rel="nofollow noopener noreferrer"&gt;http://localhost:9191/activiti-rest/service/repository/models/6852/source&lt;/A&gt;&lt;SPAN&gt;");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;add_request.header("Authorization", "Basic a2VybWl0Omtlcm1pdA==");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MultipartFormDataOutput upload = new MultipartFormDataOutput();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;String p="{\"id\":\"canvas\",\"resourceId\":\"canvas\",\"stencilset\":{\"namespace\":\"&lt;/SPAN&gt;&lt;A href="http://b3mn.org/stencilset/bpmn2.0#\" rel="nofollow noopener noreferrer"&gt;http://b3mn.org/stencilset/bpmn2.0#\&lt;/A&gt;&lt;SPAN&gt;"}}";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; byte[] b=p.getBytes();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;upload.addFormData("file-part ", b, MediaType.MULTIPART_FORM_DATA_TYPE);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;add_request.body(MediaType.MULTIPART_FORM_DATA_TYPE, upload);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;add_request.put();&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Feb 2014 05:51:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/set-the-editor-source-for-a-model/m-p/155132#M109507</guid>
      <dc:creator>gahospin</dc:creator>
      <dc:date>2014-02-13T05:51:23Z</dc:date>
    </item>
  </channel>
</rss>

