[OpenLayers-Users] WFST - Property is missing
cmre
realehrlich at geod.tu-darmstadt.de
Fri Dec 2 12:13:03 EST 2011
Hi,
i am trying to save data in my database about openlayers and a wfst.
The WFST connection is established (all memory features are displayed).
Now I want to save new features with attributes. Here my code:
var draw = new OpenLayers.Control.DrawFeature(
wfst, OpenLayers.Handler.Point, {
title: "Draw Feature",
displayClass: "olControlDrawFeaturePoint",
featureAdded: setAttributes,
handlerOptions: {multi: true}
});
...
function setAttributes (feature) {
feature.state = OpenLayers.State.INSERT;
feature.attributes.id = $("id").value;
feature.attributes["Baumart"] = $("art").value;
...
}
I get the following error about firebug:
<?xml version='1.0' encoding='UTF-8'?>
<ows:ExceptionReport xmlns:ows="http://www.opengis.net/ows"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/ows
http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd"
version="1.0.0">
<ows:Exception exceptionCode="InvalidParameterValue">
<ows:ExceptionText>Cannot perform insert operation: Error in XML
document (line: 1, column: 466, character offset: 465): Property
"{http://www.deegree.org/app}Baumart" is mandatory in features of type
"{http://www.deegree.org/app}Baum", but is missing (or at the wrong
position).</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>
For info: The WFS-getFeature-request look like this:
<wfs:FeatureCollection ...>
<wfs:member>
<app:Baum gml:id="APP_BAUM_1"
xmlns:app="http://www.deegree.org/app">
<app:Baumart>Eiche</app:Baumart>
<app:Baumalter>14</app:Baumalter>
<app:Baumhoehe>3</app:Baumhoehe>
<app:Stammumfang>56</app:Stammumfang>
<app:Kronendurchmesser>4</app:Kronendurchmesser>
<app:Zustand>Sehr gut</app:Zustand>
<app:Einfuegedatum>2011-11-28T17:56:00Z</app:Einfuegedatum>
<app:GEOMETRY>
<gml:Point gml:id="APP_BAUM_1_APP_GEOMETRY"
srsName="EPSG:31467">
<gml:pos>3476929.890 5525297.380</gml:pos>
</gml:Point>
</app:GEOMETRY>
</app:Baum>
</wfs:member>
</wfs:FeatureCollection>
What is wrong? Have anyone a idea?
Best regards
cmre
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/WFST-Property-is-missing-tp7055455p7055455.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list