<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.</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">http://www.opengis.net/ows</a>'</div>
<div> xmlns:ows='<a href="http://www.opengis.net/ows">http://www.opengis.net/ows</a>'</div><div> xmlns:xsi='<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>'</div>
<div> xsi:schemaLocation='<a href="http://www.opengis.net/ows">http://www.opengis.net/ows</a> <a href="http://schemas.opengis.net/ows/1.0.0/owsExceptionReport.xsd">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">http://www.opengis.net/wfs</a>" service="WFS" version="1.0.0" xsi:schemaLocation="<a href="http://www.opengis.net/wfs">http://www.opengis.net/wfs</a> <a href="http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd">http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd</a>" xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>"><wfs:Insert><feature:mk_city_centre xmlns:feature="<a href="https://geoinformatics.aalto.fi/">https://geoinformatics.aalto.fi/</a>"><feature:the_geom3857><gml:MultiPolygon xmlns:gml="<a href="http://www.opengis.net/gml">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">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">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">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">http://www.opengis.net/gml}_Feature</a>, {<a href="http://www.opengis.net/wfs}FeatureCollection">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">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/">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/">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">https://geoinformatics.aalto.fi/kala/tinyows.cgi</a>",</div><div>          featureNS :  "<a href="https://geoinformatics.aalto.fi/">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">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">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">http://www.opengis.net/gml}_Feature</a>, {<a href="http://www.opengis.net/wfs}FeatureCollection">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>