Am 28.09.11 14:40, schrieb Florent André:
I got this module, try to dive into test, but don't really see how to
solve this really simple usecase :
you have a client that just send a file on the server in just one shot
and stateless (no auth exchange),
simply, just write down a curl [1] and have a new document in the cms.
Any thought ?
[1] like this one :
$ curl -X POST
>>>
"http://yourhost/lenya/publication-name/modules/lenyaDocWriting/create"
>>> -F "processing=@createDocument.xml"
ToDo:
* Add general support for HTTP basic auth (already works for WebDAV)
* Add support for POST for XML documents to atom module
* curl --user name:password …
Something for the next meeting, or a rainy afternoon :)
-- Andreas
++
On 09/28/2011 01:53 PM, Thomas Comiotto wrote:
http://svn.apache.org/repos/asf/lenya/contributions/2_0_X/modules/atom/
The module already supports assets. So it should be easy to add document
posts.
Best
Thomas
On Wed, 2011-09-28 at 13:29 +0200, florent andré wrote:
how ? :)
On 09/28/2011 01:23 PM, thomas.comio...@id.uzh.ch wrote:
Please use the atompub module for this!
Best
Thomas
-----florent andré<florent.andre-...@4sengines.com> schrieb: -----
An: lenya dev<dev@lenya.apache.org>
Von: florent andré<florent.andre-...@4sengines.com>
Datum: 09/28/2011 01:00PM
Betreff: REST interface for creating a lenya document
It's a really first version (names will change).
The more simple usecase for creating one document with specific body
$ curl -X POST
"http://yourhost/lenya/publication-name/modules/lenyaDocWriting/create"
-F "processing=@createDocument.xml"
For Frieburg hackers :
$ curl -X POST
"http://193.196.240.56:8080/lenya/default/modules/lenyaDocWriting/create"
-F
"processing=@addxhtmlfile.xml"
content of the addxhtmlfile.xml file (save on you fs do $curl in the
same folder) :
=========
<?xml version="1.0" encoding="UTF-8"?>
<lenyadoc:lenyadoc xmlns:lenyadoc="http://4sengines/lenyadoc/0.1"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<lenyadoc:parameters>
<lenyadoc:resourcetype>xhtml</lenyadoc:resourcetype>
<lenyadoc:pubname>default</lenyadoc:pubname>
<lenyadoc:parentpath>/tutorial</lenyadoc:parentpath>
<lenyadoc:language>en</lenyadoc:language>
<lenyadoc:navtitle>Title of your new document</lenyadoc:navtitle>
</lenyadoc:parameters>
<!-- replace the body content of the default resource created -->
<lenyadoc:content>
<lenyadoc:contentpath>html</lenyadoc:contentpath>
<lenyadoc:replacepath>body</lenyadoc:replacepath>
<lenyadoc:fragment>
<xhtml:body>
<xhtml:p> here you have new content !!</xhtml:p>
</xhtml:body>
</lenyadoc:fragment>
</lenyadoc:content>
</lenyadoc:lenyadoc>
=========
end file content
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lenya.apache.org
For additional commands, e-mail: dev-h...@lenya.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lenya.apache.org
For additional commands, e-mail: dev-h...@lenya.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lenya.apache.org
For additional commands, e-mail: dev-h...@lenya.apache.org
--
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch
Tel.: +41 (0) 43 818 57 01
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lenya.apache.org
For additional commands, e-mail: dev-h...@lenya.apache.org