<?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 Publish content of type 'article' using WS in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/publish-content-of-type-article-using-ws/m-p/270755#M223885</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi everyone,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like to publish content (e.g. html pages) of type 'article' using web services, so that they can be published in the 'blog' section of the Web Quick Start application.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Right now, all I achieved to do, is to publish content and to change the type of this content in Alfresco Share to 'article' (see picture)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://img857.imageshack.us/i/changetype.png/" rel="nofollow noopener noreferrer"&gt;[img]http://img857.imageshack.us/img857/3042/changetype.png[/img]&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Uploaded with &lt;/SPAN&gt;&lt;A href="http://imageshack.us" rel="nofollow noopener noreferrer"&gt;ImageShack.us&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, I would like to directly publish it as an article, i.e. not have to set it manually in Alfresco Share for each content I publish. Is there a property that I can set to set it to type 'article' ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a lot !&amp;nbsp; &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;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Bellow my code (basically the same as the web service examples of the SDK)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&lt;BR /&gt;// Create a parent reference, this contains information about the association we are createing to the new content and the&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // parent of the new content (the space retrived from the search)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ParentReference parentReference = new ParentReference(STORE, null, parent, ASSOC_CONTAINS, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "{" + Constants.NAMESPACE_CONTENT_MODEL + "}" + name);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Define the content format for the content we are adding&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ContentFormat contentFormat = new ContentFormat("text/html", "UTF-8");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NamedValue[] properties = new NamedValue[]{Utils.createNamedValue(Constants.PROP_NAME, name)};&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CMLCreate create = new CMLCreate("1", parentReference, null, null, null, Constants.TYPE_CONTENT, properties);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CML cml = new CML();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cml.setCreate(new CMLCreate[]{create});&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UpdateResult[] result = WebServiceFactory.getRepositoryService().update(cml);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Reference newContentNode = result[0].getDestination();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Content content = contentService.write(newContentNode, Constants.PROP_CONTENT, contentString.getBytes(), contentFormat);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &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;/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>Mon, 30 May 2011 11:30:30 GMT</pubDate>
    <dc:creator>billbaroud</dc:creator>
    <dc:date>2011-05-30T11:30:30Z</dc:date>
    <item>
      <title>Publish content of type 'article' using WS</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/publish-content-of-type-article-using-ws/m-p/270755#M223885</link>
      <description>Hi everyone,I would like to publish content (e.g. html pages) of type 'article' using web services, so that they can be published in the 'blog' section of the Web Quick Start application.Right now, all I achieved to do, is to publish content and to change the type of this content in Alfresco Share t</description>
      <pubDate>Mon, 30 May 2011 11:30:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/publish-content-of-type-article-using-ws/m-p/270755#M223885</guid>
      <dc:creator>billbaroud</dc:creator>
      <dc:date>2011-05-30T11:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: Publish content of type 'article' using WS</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/publish-content-of-type-article-using-ws/m-p/270756#M223886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Just in case: I've been looking at the examples, the WIKI pages, the documentation… for a long time, and found nothing. I really need help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 May 2011 11:35:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/publish-content-of-type-article-using-ws/m-p/270756#M223886</guid>
      <dc:creator>billbaroud</dc:creator>
      <dc:date>2011-05-30T11:35:43Z</dc:date>
    </item>
    <item>
      <title>Re: Publish content of type 'article' using WS</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/publish-content-of-type-article-using-ws/m-p/270757#M223887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Found it!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I needed to use the type {&lt;/SPAN&gt;&lt;A href="http://www.alfresco.org/model/website/1.0}article" rel="nofollow noopener noreferrer"&gt;http://www.alfresco.org/model/website/1.0}article&lt;/A&gt;&lt;SPAN&gt; instead of Constants.TYPE_CONTENT&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 May 2011 14:18:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/publish-content-of-type-article-using-ws/m-p/270757#M223887</guid>
      <dc:creator>billbaroud</dc:creator>
      <dc:date>2011-05-30T14:18:21Z</dc:date>
    </item>
  </channel>
</rss>

