<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi,<br>
<br>
You can try if you can have success with my server http://hip.latuviitta.org/cgi-bin/tinyows<b><br>
</b>Kosmo GIS which is an excellent open source GIS client for WFS creates the following request. Compare and see if you'll find something interesting.<br>
<br>
<?xml version='1.0' encoding='UTF-8'?><br>
<wfs:Transaction version="1.0.0" service="WFS" xmlns:lv="http://latuviitta.fi/" <br>
xmlns:gml="http://www.opengis.net/gml" <br>
xmlns:ogc="http://www.opengis.net/ogc" <br>
xmlns:wfs="http://www.opengis.net/wfs" <br>
xmlns:xlink="http://www.w3.org/1999/xlink" <br>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <br>
xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd http://hip.latuviitta.org/cgi-bin/tinyows?SERVICE=WFS&amp;REQUEST=DescribeFeatureType&amp;version=1.0.0&amp;TYPENAME=lv:editable_multipolygons&amp;NAMESPACE=xmlns(lv=http://latuviitta.fi/)
 http://latuviitta.fi/"><br>
<wfs:Insert handle="insert1" idgen="GenerateNew"><br>
<lv:editable_multipolygons xmlns:lv="http://latuviitta.fi/"><br>
<lv:geom><gml:MultiPolygon xmlns:gml="http://www.opengis.net/gml" srsName="EPSG:3067"><br>
<gml:polygonMember><br>
<gml:Polygon xmlns:gml="http://www.opengis.net/gml" srsName="EPSG:3067">    <br>
<gml:outerBoundaryIs>       <br>
<gml:LinearRing>  <br>
<gml:coordinates>195203.757,7279828.574 225034.737,7307065.556 262647.711,7278531.575 260053.713,7238324.602 217252.742,7242215.6 195203.757,7279828.574
<br>
</gml:coordinates><br>
</gml:LinearRing>     <br>
</gml:outerBoundaryIs>     <br>
</gml:Polygon><br>
</gml:polygonMember><br>
</gml:MultiPolygon><br>
</lv:geom><br>
</lv:editable_multipolygons><br>
</wfs:Insert><br>
</wfs:Transaction><br>
<br>
-Jukka Rahkonen-<br>
<br>
<b><br>
</b> Jiøí Kadlec <font size="2">w</font>rote:<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<div style="direction: ltr;" id="divRpF89531"><font color="#000000" face="Tahoma" size="2"></font><br>
</div>
<div></div>
<div>
<div dir="ltr">> I have installed and set-up TinyOWS for editing features from PostGIS database on a RHEL6 Linux server.
<div>> Displaying features is working OK in QGIS and in Openlayers.<br>
</div>
<div>> Editing a feature also works correctly.</div>
<div>> However, when I try to insert a new feature I get the following error response:</div>
<div><br>
</div>
<div>
<div><?xml version='1.0' encoding='UTF-8'?></div>
<div><ows:ExceptionReport</div>
<div> xmlns='<a href="http://www.opengis.net/ows" target="_blank">http://www.opengis.net/ows</a>'</div>
<div> xmlns:ows='<a href="http://www.opengis.net/ows" target="_blank">http://www.opengis.net/ows</a>'</div>
<div> xmlns:xsi='<a href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a>'</div>
<div> xsi:schemaLocation='<a href="http://www.opengis.net/ows" target="_blank">http://www.opengis.net/ows</a>
<a href="http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd" target="_blank">
http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd</a>'</div>
<div> version='1.1.0' language='en'></div>
<div> <ows:Exception exceptionCode='InvalidParameterValue' locator='request'></div>
<div>  <ows:ExceptionText>XML request isn't valid</ows:ExceptionText></div>
<div> </ows:Exception></div>
<div></ows:ExceptionReport></div>
<div><br>
</div>
<div>Here is the Request payload that gets posted to TinyOWS:</div>
<div>
<ol class="" style="margin:0px; min-width:100%; list-style-type:none; color:rgb(48,57,66); font-family:Ubuntu,Arial,sans-serif; font-size:12px; padding:2px 6px!important">
<li title="" style="padding:0px 0px 0px 14px; margin-top:1px; word-wrap:break-word; white-space:nowrap">
<span class="" style="font-family:'dejavu sans mono',monospace; white-space:pre-wrap; display:inline; margin-right:100px; word-break:break-all; margin-top:1px; font-size:11px!important"><wfs:Transaction xmlns:wfs="<a href="http://www.opengis.net/wfs" target="_blank">http://www.opengis.net/wfs</a>"
 service="WFS" version="1.0.0" xsi:schemaLocation="<a href="http://www.opengis.net/wfs" target="_blank">http://www.opengis.net/wfs</a>
<a href="http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd" target="_blank">
http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd</a>" xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a>"><wfs:Insert><feature:mk_city_centre xmlns:feature="<a href="https://geoinformatics.aalto.fi/" target="_blank">https://geoinformatics.aalto.fi/</a>"><feature:the_geom3857><gml:MultiPolygon
 xmlns:gml="<a href="http://www.opengis.net/gml" target="_blank">http://www.opengis.net/gml</a>" srsName="EPSG:3857"><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates decimal="." cs="," ts=" ">2852436.2002366,8629373.6312116
 2851633.6114397,8628494.6053864 2850678.1485863,8629067.8830985 2850563.4930439,8630176.2200085 2852436.2002366,8629373.6312116</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember></gml:MultiPolygon></feature:the_geom3857></feature:mk_city_centre></wfs:Insert></wfs:Transaction></span>
</li></ol>
<div><font color="#303942" face="dejavu sans mono, monospace"><span style="font-size:11px; white-space:pre-wrap"><br>
</span></font></div>
</div>
<div><br>
</div>
<div><br>
</div>
-- <br>
My TinyOWS error log shows:</div>
<div><br>
</div>
<div>
<ol class="" style="margin:0px; min-width:100%; list-style-type:none; padding:2px 6px!important">
<li title="" style="padding:0px 0px 0px 14px; margin-top:1px; word-wrap:break-word">
</li><li title="" style="padding:0px 0px 0px 14px; margin-top:1px; word-wrap:break-word">
<font color="#303942" face="dejavu sans mono, monospace"><span style="font-size:11px; white-space:pre-wrap">[Thu Jan 23 04:45:19 2014] [ERROR] Element '{<a href="http://www.w3.org/2001/XMLSchema}import" target="_blank">http://www.w3.org/2001/XMLSchema}import</a>':
 Failed to locate a schema at location '<a href="https://geoinformatics.aalto.fi/kala/tinyows.cgi?service=WFS&request=DescribeFeatureType&version=1.0.0" target="_blank">https://geoinformatics.aalto.fi/kala/tinyows.cgi?service=WFS&request=DescribeFeatureType&version=1.0.0</a>'.
 Skipping the import.</span></font> </li><li title="" style="padding:0px 0px 0px 14px; margin-top:1px; word-wrap:break-word">
<font color="#303942" face="dejavu sans mono, monospace"><span style="font-size:11px; white-space:pre-wrap"><br>
</span></font></li><li title="" style="padding:0px 0px 0px 14px; margin-top:1px; word-wrap:break-word">
<font color="#303942" face="dejavu sans mono, monospace"><span style="font-size:11px; white-space:pre-wrap">[Thu Jan 23 04:45:19 2014] [ERROR] Element '{<a href="https://geoinformatics.aalto.fi/}mk_city_centre" target="_blank">https://geoinformatics.aalto.fi/}mk_city_centre</a>':
 This element is not expected. Expected is one of ( {<a href="http://www.opengis.net/gml}_Feature" target="_blank">http://www.opengis.net/gml}_Feature</a>, {<a href="http://www.opengis.net/wfs}FeatureCollection" target="_blank">http://www.opengis.net/wfs}FeatureCollection</a>
 ).</span></font> </li><li title="" style="padding:0px 0px 0px 14px; margin-top:1px; word-wrap:break-word">
<font color="#303942" face="dejavu sans mono, monospace"><span style="font-size:11px; white-space:pre-wrap"><br>
</span></font></li><li title="" style="padding:0px 0px 0px 14px; margin-top:1px; word-wrap:break-word">
<font color="#303942" face="dejavu sans mono, monospace"><span style="font-size:11px; white-space:pre-wrap">[Thu Jan 23 04:45:19 2014] [ERROR] XML request isn't valid</span></font></li><li></li></ol>
</div>
<div><font color="#303942" face="dejavu sans mono, monospace"><span style="font-size:11px; white-space:pre-wrap"><br>
</span></font></div>
<div><font color="#303942" face="dejavu sans mono, monospace"><span style="font-size:11px; white-space:pre-wrap"><br>
</span></font></div>
<div><font color="#303942" face="dejavu sans mono, monospace"><span style="font-size:11px; white-space:pre-wrap"><br>
</span></font>Here's my tinyows.xml configuration file:</div>
<div><br>
</div>
<div>
<div><tinyows online_resource="<a href="https://geoinformatics.aalto.fi/kala/tinyows.cgi" target="_blank">https://geoinformatics.aalto.fi/kala/tinyows.cgi</a>"</div>
<div>         schema_dir="/usr/local/share/tinyows/schema/"</div>
<div>         log="/tmp/tinyows.log"</div>
<div>         log_level="1"></div>
<div>  <pg host="localhost" user="postgres" password="*********" dbname="LAHTI" port="5432"/></div>
<div><br>
</div>
<div>  <metadata name="TinyOWS Server"</div>
<div>            title="Lahti Urban  WFS Server" /></div>
<div><br>
</div>
<div>  <layer retrievable="1"</div>
<div>         writable="1"</div>
<div>         ns_prefix="tows"</div>
<div>         ns_uri="<a href="https://geoinformatics.aalto.fi/" target="_blank">https://geoinformatics.aalto.fi/</a>"</div>
<div>         name="subwatersheds"</div>
<div>         title="subwatersheds" /></div>
<div><br>
</div>
<div> <layer retrievable="1"</div>
<div>         writable="1"</div>
<div>         ns_prefix="tows"</div>
<div>         ns_uri="<a href="https://geoinformatics.aalto.fi/" target="_blank">https://geoinformatics.aalto.fi/</a>"</div>
<div>         name="mk_city_centre"</div>
<div>         title="Lahti City Centre"</div>
<div>         exclude_items="the_geom3880" /></div>
</div>
<div>
<div></tinyows></div>
</div>
<div><br>
</div>
<div>And finally, here is my OpenLayers editing client javascript code snippet:</div>
<div>
<div>  </div>
<div>  var saveStrategy = new OpenLayers.Strategy.Save();</div>
<div>  saveStrategy.events.register("success", '', showSuccessMsg);</div>
<div>  saveStrategy.events.register("fail", '', showFailureMsg);</div>
<div>  wfs = new OpenLayers.Layer.Vector("Editable Features", {</div>
<div>      strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy],</div>
<div>      projection: new OpenLayers.Projection("EPSG:3857"),</div>
<div>      protocol: new OpenLayers.Protocol.WFS({</div>
<div>          version: "1.0.0",</div>
<div>          srsName: "EPSG:3857",</div>
<div>          url: "<a href="https://geoinformatics.aalto.fi/kala/tinyows.cgi" target="_blank">https://geoinformatics.aalto.fi/kala/tinyows.cgi</a>",</div>
<div>          featureNS :  "<a href="https://geoinformatics.aalto.fi/" target="_blank">https://geoinformatics.aalto.fi/</a>",</div>
<div>          featureType: "mk_city_centre",</div>
<div>          geometryName: "the_geom3857"</div>
<div>          //schema: "<a href="https://geoinformatics.aalto.fi/kala/tinyows.cgi?service=wfs&version=1.0.0&request=DescribeFeatureType&typeName=tows:mk_city_centre" target="_blank">https://geoinformatics.aalto.fi/kala/tinyows.cgi?service=wfs&version=1.0.0&request=DescribeFeatureType&typeName=tows:mk_city_centre</a>"</div>
<div>      })</div>
<div>  });</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div>I've never used TinyOWS before. Any Ideas what I'm doing wrong? Especially the error message </div>
<div><span style="color:rgb(48,57,66); font-family:'dejavu sans mono',monospace; font-size:11px; white-space:pre-wrap">Element '{<a href="https://geoinformatics.aalto.fi/}mk_city_centre" target="_blank">https://geoinformatics.aalto.fi/}mk_city_centre</a>':
 This element is not expected. Expected is one of ( {<a href="http://www.opengis.net/gml}_Feature" target="_blank">http://www.opengis.net/gml}_Feature</a>, {<a href="http://www.opengis.net/wfs}FeatureCollection" target="_blank">http://www.opengis.net/wfs}FeatureCollection</a>
 ).</span></div>
<div><br>
is confusing.</div>
<div><br>
</div>
<div>Thanks in advance for any hints or suggestions how to solve the problem.<br>
<br>
</div>
<div>Jiri Kadlec</div>
</div>
</div>
</div>
</div>
</body>
</html>