<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
Hi again,<br><br>Now that I am looking more carefully the log file, I see in the query, before the error this statement:<br><font style="" face="Courier New">... xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/WFS-transaction.xsd"></font><font style="" face="Courier New"><br><br><font style="" face="Tahoma">Shouldn't this schema location be something else, perhaps located in my computer? If yes, how can I change it, to test it again?</font><font style="" face="Tahoma"><br></font><font style="" face="Tahoma"><br></font><font style="" face="Tahoma">Thanks</font><br></font><br><div><div id="SkyDrivePlaceholder"></div><hr id="stopSpelling">From: erndal02@hotmail.com<br>To: tinyows-dev@lists.maptools.org<br>Date: Tue, 8 May 2012 20:46:39 +0200<br>Subject: [TinyOWS-dev] Error when inserting new feature with TinyOWS<br><br>
<style><!--
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Tahoma;}
--></style>
<div dir="ltr">
Hi to all,<br><br>I configured a layer with TinyOWS and MS4W in Windows. I have other layers in the map viewer too, configured with OpenLayers, but the layer that I configured with TinyOWS is supposed to be editable. Anyway, I can edit and delete features from the layer. But unfortunately I haven't managed yet to insert new features.<br><br>In the log of TinyOWS, when I try to insert a new feature, I keep getting an error:<br><br><font style="" face="Courier New">[ERROR] Element '{http://www.tinyows.org/}olives': This element is not expected. Expected is one of ( {http://www.opengis.net/gml}_Feature, {http://www.opengis.net/wfs}FeatureCollection )</font><br><br>Just before the error, in the log file I see this query:<br><font style="" face="Courier New"><wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs" service="WFS" version="1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/WFS-transaction.xsd"></font><font style="" face="Courier New"><br></font><font style="" face="Courier New"> <wfs:Insert></font><font style="" face="Courier New"><br></font><font style="" face="Courier New"> <feature:olives xmlns:feature="http://www.tinyows.org/"></font><font style="" face="Courier New"><br></font><font style="" face="Courier New"> <feature:geometry></font><font style="" face="Courier New"><br></font><font style="" face="Courier New"> <gml:MultiPolygon xmlns:gml="http://www.opengis.net/gml" srsName="EPSG:32634"></font><font style="" face="Courier New"><br></font><font style="" face="Courier New"> <gml:polygonMember></font><font style="" face="Courier New"><br></font><font style="" face="Courier New"> <gml:Polygon></font><font style="" face="Courier New"><br></font><font style="" face="Courier New"> <gml:outerBoundaryIs></font><font style="" face="Courier New"><br></font><font style="" face="Courier New"> <gml:LinearRing></font><font style="" face="Courier New"><br></font><font style="" face="Courier New"> <gml:coordinates decimal="." cs="," ts=" ">381781.25,4509578.125 381875,4509031.25 382656.25,4509734.375 381781.25,4509578.125</gml:coordinates></font><font style="" face="Courier New"><br></font><font style="" face="Courier New"> </gml:LinearRing></font><font style="" face="Courier New"><br></font><font style="" face="Courier New"> </gml:outerBoundaryIs></font><font style="" face="Courier New"><br></font><font style="" face="Courier New"> </gml:Polygon></font><font style="" face="Courier New"><br></font><font style="" face="Courier New"> </gml:polygonMember></font><font style="" face="Courier New"><br></font><font style="" face="Courier New"> </gml:MultiPolygon></font><font style="" face="Courier New"><br></font><font style="" face="Courier New"> </feature:geometry></font><font style="" face="Courier New"><br></font><font style="" face="Courier New"> </feature:olives></font><font style="" face="Courier New"><br></font><font style="" face="Courier New"> </wfs:Insert></font><font style="" face="Courier New"><br></font><font style="" face="Courier New"></wfs:Transaction></font><br><br><br>The config.xml is like this:<br><font style="" face="Courier New"><tinyows online_resource="http://localhost:81/cgi-bin/tinyows.exe"</font><font style="" face="Courier New"><br></font><font style="" face="Courier New"> schema_dir="C:/ms4w/apps/tinyows/schema/"</font><font style="" face="Courier New"><br></font><font style="" face="Courier New"> log="C:/ms4w/apps/tinyows/tinyows.log"</font><font style="" face="Courier New"><br></font><font style="" face="Courier New"> log_level="15"></font><font style="" face="Courier New"><br></font><font style="" face="Courier New"> <pg host="127.0.0.1" user="postgres" password="***" dbname="olives_gis1" port="5432"/></font><font style="" face="Courier New"><br></font><font style="" face="Courier New"> <metadata name="Olives WFST Server"</font><font style="" face="Courier New"><br></font><font style="" face="Courier New"> title="WFST Olives" /></font><font style="" face="Courier New"><br></font><font style="" face="Courier New"><br></font><font style="" face="Courier New"> <layer retrievable="1"</font><font style="" face="Courier New"><br></font><font style="" face="Courier New"> writable="1"</font><font style="" face="Courier New"><br></font><font style="" face="Courier New"> ns_prefix="tows"</font><font style="" face="Courier New"><br></font><font style="" face="Courier New"> ns_uri="http://www.tinyows.org/"</font><font style="" face="Courier New"><br></font><font style="" face="Courier New"> //srid="EPSG:32634"</font><font style="" face="Courier New"><br></font><font style="" face="Courier New"> name="olives"</font><font style="" face="Courier New"><br></font><font style="" face="Courier New"> title="olives"/> </font><font style="" face="Courier New"><br></font><font style="" face="Courier New"></tinyows></font><br><br>I thought the error might happen because in the database the geometry of the table olives is declared as POLYGON, so I changed it to MULTIPOLYGON, but I still got the same error. I also changed the WFS schema to 1.0.0, but still the same error.<br><br>I have declared a DrawFeature variable like this, to draw the feature that will be saved in the database:<br><br><font style="" face="Courier New"> var draw = new OpenLayers.Control.DrawFeature(</font><font style="" face="Courier New"><br></font><font style="" face="Courier New"> wfs, OpenLayers.Handler.Polygon,</font><font style="" face="Courier New"><br></font><font style="" face="Courier New"> {</font><font style="" face="Courier New"><br></font><font style="" face="Courier New"> title: "Add olives",</font><font style="" face="Courier New"><br></font><font style="" face="Courier New"> displayClass: "olControlDrawFeaturePolygon",</font><font style="" face="Courier New"><br></font><font style="" face="Courier New"> multi: "true",</font><font style="" face="Courier New"><br></font><font style="" face="Courier New"> id: "draw"</font><font style="" face="Courier New"><br></font><font style="" face="Courier New"> }</font><font style="" face="Courier New"><br></font><font style="" face="Courier New"> );</font><br><br><br>I would like to mention again that the editing and deleting of existing features work very well.<br><br>I am using MS4W 3.0.4 (with OL included) and tinyows-1.0.0rc3. The database is in PostgreSQL & PostGIS.<br><br>Since I don't have much experience with these technologies (more than 1 month) I might have made some stupid error, but I cannot find it anyway...<br><br>Thanks a lot in advance for your help<br>                                            </div>
<br>_______________________________________________
TinyOWS-dev mailing list
TinyOWS-dev@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tinyows-dev</div>                                            </div></body>
</html>