<?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 PHP Automation Client in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/php-automation-client/m-p/321872#M8873</link>
    <description>&lt;P&gt;How can I set following two properties (which might be multiple value properties) dc:subjects and dc:contributors. I can set all the other properites by passing their values as string using following method...
$answer = $session-&amp;gt;newRequest("Document.SetProperty")-&amp;gt;set('input', 'doc:' . $path)-&amp;gt;set('params', 'value', $value)-&amp;gt;set('params', 'xpath', $xpath)-&amp;gt;sendRequest();&lt;/P&gt;
&lt;P&gt;where $xpath is property name such as dc:title and $value is string like 'My First File'.&lt;/P&gt;</description>
    <pubDate>Tue, 30 Aug 2011 18:34:13 GMT</pubDate>
    <dc:creator>Megha_</dc:creator>
    <dc:date>2011-08-30T18:34:13Z</dc:date>
    <item>
      <title>PHP Automation Client</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/php-automation-client/m-p/321872#M8873</link>
      <description>&lt;P&gt;How can I set following two properties (which might be multiple value properties) dc:subjects and dc:contributors. I can set all the other properites by passing their values as string using following method...
$answer = $session-&amp;gt;newRequest("Document.SetProperty")-&amp;gt;set('input', 'doc:' . $path)-&amp;gt;set('params', 'value', $value)-&amp;gt;set('params', 'xpath', $xpath)-&amp;gt;sendRequest();&lt;/P&gt;
&lt;P&gt;where $xpath is property name such as dc:title and $value is string like 'My First File'.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2011 18:34:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/php-automation-client/m-p/321872#M8873</guid>
      <dc:creator>Megha_</dc:creator>
      <dc:date>2011-08-30T18:34:13Z</dc:date>
    </item>
    <item>
      <title>Re: PHP Automation Client</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/php-automation-client/m-p/321873#M8874</link>
      <description>&lt;P&gt;To set multiple properties on a Document, you can use the &lt;CODE&gt;Document.Update&lt;/CODE&gt; operation.&lt;/P&gt;
&lt;P&gt;See the documentation &lt;A href="http://doc.nuxeo.com/x/GwM7"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;To set multi valued property, separate the values with &lt;CODE&gt;,&lt;/CODE&gt;:&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;dc:subjects=arts/architecture,arts/cinema&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2011 22:38:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/php-automation-client/m-p/321873#M8874</guid>
      <dc:creator>Thomas_Roger</dc:creator>
      <dc:date>2011-08-31T22:38:33Z</dc:date>
    </item>
    <item>
      <title>Re: PHP Automation Client</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/php-automation-client/m-p/321874#M8875</link>
      <description>&lt;P&gt;Hi There,&lt;/P&gt;
&lt;P&gt;I already tried doing it that way but that doesn't work. Please look at the code below...&lt;/P&gt;
&lt;P&gt;/* This line creates a blank document */
$answer = $session-&amp;gt;newRequest("Document.Create")
-&amp;gt;set('input', 'doc:' . $filePath)
-&amp;gt;set('params', 'type', $type)
-&amp;gt;set('params', 'name', $name)
-&amp;gt;sendRequest();&lt;/P&gt;
&lt;P&gt;/* This line retrieves the path of the document */
$path = $answer-&amp;gt;getDocument(0)-&amp;gt;getPath();&lt;/P&gt;
&lt;P&gt;/* This line works fine and sets up the property (ie dc:description) without any trouble */
$answer = $session-&amp;gt;newRequest("Document.SetProperty")-&amp;gt;set('input', 'doc:' . $path)-&amp;gt;set('params','xpath',"dc:description")-&amp;gt;set('params','value',"This is the description of file")-&amp;gt;sendRequest();&lt;/P&gt;
&lt;P&gt;/* This line fires Error Server message when executed and doesn't set the property dc:subjects at all */
$answer = $session-&amp;gt;newRequest("Document.SetProperty")-&amp;gt;set('input', 'doc:' . $path)-&amp;gt;set('params','xpath',"dc:subjects")-&amp;gt;set('params','value',"arts/architecture,arts/cinema")-&amp;gt;sendRequest();&lt;/P&gt;
&lt;P&gt;So basically I need to know how I can set the property using PHP Automation Client. There must be a different syntax to set up multi-value property for the PHP Automation Client.&lt;/P&gt;
&lt;P&gt;Secondly, I also tried using Document.Update automation request as per the example (using PHP Automation Client) but that didn't work.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;So basically I need PHP Automation Client Examples for setting up multiple properties and multi-value properties.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2011 12:51:54 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/php-automation-client/m-p/321874#M8875</guid>
      <dc:creator>Megha_</dc:creator>
      <dc:date>2011-09-01T12:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: PHP Automation Client</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/php-automation-client/m-p/321875#M8876</link>
      <description>&lt;P&gt;here the sample use case you need I think.
in one properties string you can set multiple params (separated with \n) taking multiple values (separated with ,) be aware to use double quotes so the \n character is understand properly.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;$session-&amp;gt;newRequest("Document.Update")
		-&amp;gt;set('input', 'doc:' . $inputDocPath)
		-&amp;gt;set('params', 'properties', "dc:title=The Document Title\ndc:description=foo bar\ndc:subjects=arts/architecture,arts/cinema")
		-&amp;gt;sendRequest();
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Feb 2013 16:42:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/php-automation-client/m-p/321875#M8876</guid>
      <dc:creator>Guian_</dc:creator>
      <dc:date>2013-02-27T16:42:22Z</dc:date>
    </item>
  </channel>
</rss>

