[daisy] Error inserting document via HTTP API
Bruno Dumon
bruno at outerthought.org
Mon Sep 17 03:17:05 CDT 2007
On Fri, 2007-09-14 at 19:43 +0200, Luca Morandini wrote:
> Folks,
>
> sorry for bothering you with such a silly thing, but I am unable to
> insert a document into my Daisy 2.0.1 repo with HTTP (I'm using
> the fikin-ant-tasks library to manipulate the repo within Ant).
>
> I have a rather simple documentType (two string fields, one HTML part):
>
> 1) XML document describing the documentType:
> <?xml version="1.0"?>
> <ns:document xmlns:ns="http://outerx.org/daisy/1.0"
> name="Test boat page"
> typeId="13"
> owner="103"
> validateOnSave="true"
> newVersionState="publish"
> retired="false"
> private="false"
> branchId="1"
> languageId="1">
>
> <ns:customFields/>
> <ns:collectionIds>
> <ns:collectionId>1</ns:collectionId>
> </ns:collectionIds>
> <ns:fields>
> <ns:field typeId="16" dataRef="port"/>
> <ns:field typeId="18" dataRef="name"/>
> </ns:fields>
<snip/>
The fields are incorrect, the dataRef attribute is only used on parts to
refer to the part content.
To see the exact XML for fields, just get an XML representation (= do a
GET request) of an existing document with (similar types of) fields.
--
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno at outerthought.org bruno at apache.org
More information about the daisy
mailing list