<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Curl up with a good web script</title>
	<atom:link href="http://ecmarchitect.com/archives/2009/04/10/959/feed" rel="self" type="application/rss+xml" />
	<link>http://ecmarchitect.com/archives/2009/04/10/959</link>
	<description>Jeff Potts on ECM, portals, search, collaboration, and a bunch of personal stuff</description>
	<lastBuildDate>Mon, 14 May 2012 10:48:07 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: jpotts</title>
		<link>http://ecmarchitect.com/archives/2009/04/10/959/comment-page-1#comment-88193</link>
		<dc:creator>jpotts</dc:creator>
		<pubDate>Wed, 23 Nov 2011 20:50:58 +0000</pubDate>
		<guid isPermaLink="false">http://ecmarchitect.com/?p=959#comment-88193</guid>
		<description>Sorry it took me so long to get back to you on this. Hopefully you figured it out but just in case, to do a checkout on a document via the restful ATOM PUB binding, you simply post an entry to the checkedout collection. It looks like you already have the checkedout collection URL correct and your Atom entry looks fine. Are you setting the mimetype appropriately? It should be &#039;application/atom+xml;type=entry&#039;. I notice that when I do not include &#039;type=entry&#039; I get the same template processor error you are reporting.

Jeff</description>
		<content:encoded><![CDATA[<p>Sorry it took me so long to get back to you on this. Hopefully you figured it out but just in case, to do a checkout on a document via the restful ATOM PUB binding, you simply post an entry to the checkedout collection. It looks like you already have the checkedout collection URL correct and your Atom entry looks fine. Are you setting the mimetype appropriately? It should be &#8216;application/atom+xml;type=entry&#8217;. I notice that when I do not include &#8216;type=entry&#8217; I get the same template processor error you are reporting.</p>
<p>Jeff</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jpotts</title>
		<link>http://ecmarchitect.com/archives/2009/04/10/959/comment-page-1#comment-82787</link>
		<dc:creator>jpotts</dc:creator>
		<pubDate>Fri, 07 Oct 2011 23:10:27 +0000</pubDate>
		<guid isPermaLink="false">http://ecmarchitect.com/?p=959#comment-82787</guid>
		<description>To check out a document via CMIS, you post an atom entry for it to the &quot;checkedout&quot; collection. I know it works. What&#039;s tricky for people new to the API who are rolling their own XML and making posts instead of using a client library is the syntax of the XML that gets posted. I can&#039;t do it right this second, but when I get a chance I&#039;ll respond to the forum post you pointed me to.

Until then, maybe the checkedout collection hint will help you.

Jeff</description>
		<content:encoded><![CDATA[<p>To check out a document via CMIS, you post an atom entry for it to the &#8220;checkedout&#8221; collection. I know it works. What&#8217;s tricky for people new to the API who are rolling their own XML and making posts instead of using a client library is the syntax of the XML that gets posted. I can&#8217;t do it right this second, but when I get a chance I&#8217;ll respond to the forum post you pointed me to.</p>
<p>Until then, maybe the checkedout collection hint will help you.</p>
<p>Jeff</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: encorearthur</title>
		<link>http://ecmarchitect.com/archives/2009/04/10/959/comment-page-1#comment-81633</link>
		<dc:creator>encorearthur</dc:creator>
		<pubDate>Wed, 28 Sep 2011 09:09:36 +0000</pubDate>
		<guid isPermaLink="false">http://ecmarchitect.com/?p=959#comment-81633</guid>
		<description>I also found the same problem is the forum, with no answer : 
https://forums.alfresco.com/en/viewtopic.php?f=45&amp;t=36884</description>
		<content:encoded><![CDATA[<p>I also found the same problem is the forum, with no answer :<br />
<a href="https://forums.alfresco.com/en/viewtopic.php?f=45&#038;t=36884" rel="nofollow">https://forums.alfresco.com/en/viewtopic.php?f=45&#038;t=36884</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: encorearthur</title>
		<link>http://ecmarchitect.com/archives/2009/04/10/959/comment-page-1#comment-81632</link>
		<dc:creator>encorearthur</dc:creator>
		<pubDate>Wed, 28 Sep 2011 09:07:44 +0000</pubDate>
		<guid isPermaLink="false">http://ecmarchitect.com/?p=959#comment-81632</guid>
		<description>Jeff, 

Sorry to come again, but i still can&#039;t find a solution for the checkout via php curl !

I&#039;ve just tried POSTing a file via a firefox plugin to the address :
http://locahost:8080/alfresco/service/cmis/checkedout?alf_ticket=TICKET_02c1adf8da224c548a0728c699092205a7fbb32c

Here is a copy of the XML file (i replace the tag char by [] so that it would display) : 
[code]
[?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?]
	[atom:entry xmlns=&quot;http://www.w3.org/2005/Atom&quot; xmlns:cmisra=&quot;http://docs.oasis-open.org/ns/cmis/restatom/200908/&quot; xmlns:cmis=&quot;http://docs.oasis-open.org/ns/cmis/core/200908/&quot;]
		[cmisra:object]
			[cmis:properties]
				[cmis:propertyId propertyDefinitionId=&quot;cmis:objectId&quot;]
					[cmis:value]
						workspace://SpacesStore/f06f7a69-f700-4f82-8414-8609ec532f7d
					[/cmis:value]
				[/cmis:propertyId]
			[/cmis:properties]
		[/cmisra:object]
	[/atom:entry]
[/code]


And the error returned is still one that i already had : 

500 Description: An error inside the HTTP server which prevented it from fulfilling the request.

08280272 Cannot locate template processor for template org/alfresco/cmis/checkedout.post.atomentry


Any idea is welcome,

Arthur</description>
		<content:encoded><![CDATA[<p>Jeff, </p>
<p>Sorry to come again, but i still can&#8217;t find a solution for the checkout via php curl !</p>
<p>I&#8217;ve just tried POSTing a file via a firefox plugin to the address :<br />
<a href="http://locahost:8080/alfresco/service/cmis/checkedout?alf_ticket=TICKET_02c1adf8da224c548a0728c699092205a7fbb32c" rel="nofollow">http://locahost:8080/alfresco/service/cmis/checkedout?alf_ticket=TICKET_02c1adf8da224c548a0728c699092205a7fbb32c</a></p>
<p>Here is a copy of the XML file (i replace the tag char by [] so that it would display) :<br />
[code]<br />
[?xml version="1.0" encoding="utf-8"?]<br />
	[atom:entry xmlns="http://www.w3.org/2005/Atom" xmlns:cmisra="http://docs.oasis-open.org/ns/cmis/restatom/200908/" xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200908/"]<br />
		[cmisra:object]<br />
			[cmis:properties]<br />
				[cmis:propertyId propertyDefinitionId="cmis:objectId"]<br />
					[cmis:value]<br />
						workspace://SpacesStore/f06f7a69-f700-4f82-8414-8609ec532f7d<br />
					[/cmis:value]<br />
				[/cmis:propertyId]<br />
			[/cmis:properties]<br />
		[/cmisra:object]<br />
	[/atom:entry]<br />
[/code]</p>
<p>And the error returned is still one that i already had : </p>
<p>500 Description: An error inside the HTTP server which prevented it from fulfilling the request.</p>
<p>08280272 Cannot locate template processor for template org/alfresco/cmis/checkedout.post.atomentry</p>
<p>Any idea is welcome,</p>
<p>Arthur</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: encorearthur</title>
		<link>http://ecmarchitect.com/archives/2009/04/10/959/comment-page-1#comment-81012</link>
		<dc:creator>encorearthur</dc:creator>
		<pubDate>Fri, 23 Sep 2011 14:15:15 +0000</pubDate>
		<guid isPermaLink="false">http://ecmarchitect.com/?p=959#comment-81012</guid>
		<description>XML doesn&#039;t display even between [code][/code] ! Sorry !</description>
		<content:encoded><![CDATA[<p>XML doesn&#8217;t display even between [code][/code] ! Sorry !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: encorearthur</title>
		<link>http://ecmarchitect.com/archives/2009/04/10/959/comment-page-1#comment-81011</link>
		<dc:creator>encorearthur</dc:creator>
		<pubDate>Fri, 23 Sep 2011 14:13:53 +0000</pubDate>
		<guid isPermaLink="false">http://ecmarchitect.com/?p=959#comment-81011</guid>
		<description>oops, here is the  xml checkout code file : 

&lt;code&gt;
$checkOutCode = &#039;
	
		
			
				
					
						workspace://SpacesStore/f06f7a69-f700-4f82-8414-8609ec532f7d
					
				
			
		
	&#039;;




&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>oops, here is the  xml checkout code file : </p>
<p><code><br />
$checkOutCode = '</p>
<p>						workspace://SpacesStore/f06f7a69-f700-4f82-8414-8609ec532f7d</p>
<p>	';</p>
<p></code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: encorearthur</title>
		<link>http://ecmarchitect.com/archives/2009/04/10/959/comment-page-1#comment-81010</link>
		<dc:creator>encorearthur</dc:creator>
		<pubDate>Fri, 23 Sep 2011 14:11:58 +0000</pubDate>
		<guid isPermaLink="false">http://ecmarchitect.com/?p=959#comment-81010</guid>
		<description>Installed Schema	4113
Installed Version	3.4.0 (d 3370)
Server Schema	4113
Server Version	3.4.0 (d 3370)

I got to work  list files, upload (new files), delete files ... with the php-cmis-client.

I don&#039;t think there are any customizations on the server.

i only installed a few webscripts present in the &quot;opsoro&quot; project. 

The only extension i got in the wescript extension dir is the hello wold script ; )

Arthur</description>
		<content:encoded><![CDATA[<p>Installed Schema	4113<br />
Installed Version	3.4.0 (d 3370)<br />
Server Schema	4113<br />
Server Version	3.4.0 (d 3370)</p>
<p>I got to work  list files, upload (new files), delete files &#8230; with the php-cmis-client.</p>
<p>I don&#8217;t think there are any customizations on the server.</p>
<p>i only installed a few webscripts present in the &#8220;opsoro&#8221; project. </p>
<p>The only extension i got in the wescript extension dir is the hello wold script ; )</p>
<p>Arthur</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jpotts</title>
		<link>http://ecmarchitect.com/archives/2009/04/10/959/comment-page-1#comment-81009</link>
		<dc:creator>jpotts</dc:creator>
		<pubDate>Fri, 23 Sep 2011 13:54:06 +0000</pubDate>
		<guid isPermaLink="false">http://ecmarchitect.com/?p=959#comment-81009</guid>
		<description>What version of specific edition and version of Alfresco are you running and have you made any customizations or extensions other than your PHP app?

Jeff</description>
		<content:encoded><![CDATA[<p>What version of specific edition and version of Alfresco are you running and have you made any customizations or extensions other than your PHP app?</p>
<p>Jeff</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: encorearthur</title>
		<link>http://ecmarchitect.com/archives/2009/04/10/959/comment-page-1#comment-81005</link>
		<dc:creator>encorearthur</dc:creator>
		<pubDate>Fri, 23 Sep 2011 13:17:08 +0000</pubDate>
		<guid isPermaLink="false">http://ecmarchitect.com/?p=959#comment-81005</guid>
		<description>Jeff,

First thanks for your book and tutorials !

I&#039;m using Alfresco from a PHP web app. 

I found the php cmis client really helpfull ... except for checkouts and checkins ... 

Since it&#039;s not implemented yet, i decided to use libcurl to use the checkout/in CMIS webscripts that are native in Alfresco.

I&#039;m using the &quot;getting started with CMIS tutorial&quot; to do my first libcurl checkin ... and i can&#039;t get it to work.

There&#039;s also something sad : as i don&#039;t know any other way, i write a file with my xmlatom string to send it via curl.


&lt;code&gt;

// Code ATOM pour réaliser le checkout
$checkOutCode = &#039;
	
		
			
				
					
						workspace://SpacesStore/f06f7a69-f700-4f82-8414-8609ec532f7d
					
				
			
		
	&#039;;

$filePath = &#039;/var/www/html/cmis_alfresco/tototemp.atom.xml&#039;;

$temp = fopen($filePath, wb);
fwrite( $temp, $checkOutCode, strlen($checkOutCode) );
fclose($temp);



  $ch = curl_init();
  $url_search = &quot;http://localhost:8080/alfresco/service/cmis/checkedout?alf_ticket=&quot;.$ticket;
  curl_setopt($ch, CURLOPT_URL, $url_search);
  curl_setopt($ch, CURLOPT_HEADER, 0);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  
  curl_setopt($ch, CURLOPT_CUSTOMREQUEST, &#039;POST&#039;);
  curl_setopt($ch, CURLOPT_HTTPHEADER, array (&quot;Content-Type: application/atom+xml;type=entry;charset=UTF-8&quot;) );
  
  curl_setopt($ch, CURLOPT_POSTFIELDS, array ( &#039;file&#039;=&gt; &#039;@&#039;.$filePath  ) );
  
  
  // grab URL and pass it to the browser
  $toto = curl_exec($ch);
  print_r($toto);


&lt;/code&gt;


The answer i got this ways is : 
[...]
08230257 Wrapped Exception (with status template): com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character &#039;-&#039; (code 45) in prolog; expected &#039;&lt;&#039; at [row,col {unknown-source}]: [1,1]
[...]

AND for some reason, i tried to change the content type this way : &quot;Content-Type: application/atom+xml;type=atomentry;charset=UTF-8&quot;

And with this type, i&#039;m receiving this message : 
[...]
08230258 Cannot locate template processor for template org/alfresco/cmis/checkedout.post.atomentry
[...]


Any idea what&#039;s wrong ?

Thanks anyway!

Arthur</description>
		<content:encoded><![CDATA[<p>Jeff,</p>
<p>First thanks for your book and tutorials !</p>
<p>I&#8217;m using Alfresco from a PHP web app. </p>
<p>I found the php cmis client really helpfull &#8230; except for checkouts and checkins &#8230; </p>
<p>Since it&#8217;s not implemented yet, i decided to use libcurl to use the checkout/in CMIS webscripts that are native in Alfresco.</p>
<p>I&#8217;m using the &#8220;getting started with CMIS tutorial&#8221; to do my first libcurl checkin &#8230; and i can&#8217;t get it to work.</p>
<p>There&#8217;s also something sad : as i don&#8217;t know any other way, i write a file with my xmlatom string to send it via curl.</p>
<p><code></p>
<p>// Code ATOM pour réaliser le checkout<br />
$checkOutCode = '</p>
<p>						workspace://SpacesStore/f06f7a69-f700-4f82-8414-8609ec532f7d</p>
<p>	';</p>
<p>$filePath = '/var/www/html/cmis_alfresco/tototemp.atom.xml';</p>
<p>$temp = fopen($filePath, wb);<br />
fwrite( $temp, $checkOutCode, strlen($checkOutCode) );<br />
fclose($temp);</p>
<p>  $ch = curl_init();<br />
  $url_search = "http://localhost:8080/alfresco/service/cmis/checkedout?alf_ticket=".$ticket;<br />
  curl_setopt($ch, CURLOPT_URL, $url_search);<br />
  curl_setopt($ch, CURLOPT_HEADER, 0);<br />
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);</p>
<p>  curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');<br />
  curl_setopt($ch, CURLOPT_HTTPHEADER, array ("Content-Type: application/atom+xml;type=entry;charset=UTF-8") );</p>
<p>  curl_setopt($ch, CURLOPT_POSTFIELDS, array ( 'file'=&gt; '@'.$filePath  ) );</p>
<p>  // grab URL and pass it to the browser<br />
  $toto = curl_exec($ch);<br />
  print_r($toto);</p>
<p></code></p>
<p>The answer i got this ways is :<br />
[...]<br />
08230257 Wrapped Exception (with status template): com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character &#8216;-&#8217; (code 45) in prolog; expected &#8216;&lt;&#039; at [row,col {unknown-source}]: [1,1]<br />
[...]</p>
<p>AND for some reason, i tried to change the content type this way : &quot;Content-Type: application/atom+xml;type=atomentry;charset=UTF-8&quot;</p>
<p>And with this type, i&#039;m receiving this message :<br />
[...]<br />
08230258 Cannot locate template processor for template org/alfresco/cmis/checkedout.post.atomentry<br />
[...]</p>
<p>Any idea what&#039;s wrong ?</p>
<p>Thanks anyway!</p>
<p>Arthur</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jan Pfitzner</title>
		<link>http://ecmarchitect.com/archives/2009/04/10/959/comment-page-1#comment-54326</link>
		<dc:creator>Jan Pfitzner</dc:creator>
		<pubDate>Wed, 11 Aug 2010 08:39:55 +0000</pubDate>
		<guid isPermaLink="false">http://ecmarchitect.com/?p=959#comment-54326</guid>
		<description>hi,
to refresh surf webscripts in Alfresco 3.3 use (add accept-charset &amp; -language headers):
curl -s -d &quot;reset=on&quot; --header &quot;Accept-Charset:ISO-8859-1,utf-8&quot; --header &quot;Accept-Language:en&quot; -u admin:admin http://localhost:8080/share/service/index

cheers, jan

PS: thanks to mike for his tweet</description>
		<content:encoded><![CDATA[<p>hi,<br />
to refresh surf webscripts in Alfresco 3.3 use (add accept-charset &amp; -language headers):<br />
curl -s -d &#8220;reset=on&#8221; &#8211;header &#8220;Accept-Charset:ISO-8859-1,utf-8&#8243; &#8211;header &#8220;Accept-Language:en&#8221; -u admin:admin <a href="http://localhost:8080/share/service/index" rel="nofollow">http://localhost:8080/share/service/index</a></p>
<p>cheers, jan</p>
<p>PS: thanks to mike for his tweet</p>
]]></content:encoded>
	</item>
</channel>
</rss>

