<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'>
It is looking like a monologue to me, but I still have hopes that I will find or get a solution for my issue, since I am having deadlines too...<br><br>Anyway from what I have been reading about similar issues to mine, it looks like I have troubles in configuring the config.xml within tinyows.<br><br>> <tinyows online_resource="http://localhost:81/cgi-bin/tinyows.exe"<br>> schema_dir="C:/ms4w/apps/tinyows/schema/"<br>> log="C:/ms4w/apps/tinyows/tinyows.log"<br>> log_level="15"><br>> <pg host="127.0.0.1" user="postgres" password="***" dbname="olives_gis1" port="5432"/><br>> <metadata name="Olives WFST Server"<br>> title="WFST Olives" /><br>> <br>> <layer retrievable="1"<br>> writable="1"<br>> ns_prefix="tows"<br>> ns_uri="http://127.0.0.1/"<br>> //srid="EPSG:32634"<br>> name="olives"<br>> title="olives"/><br>> </tinyows><br><br>I made in postgis another table which has only the fid (primary key) column and the geometry column, so that to make sure it is not an issue with the plain data. The name of the postgis table is olives2.<br><br>But I am still having the same error from the logs...<br><br><font style="" face="Courier New">[ERROR] Element
'{http://www.w3.org/2001/XMLSchema}import': Failed to locate a schema at
location
'http://localhost:81/cgi-bin/tinyows.exe?service=WFS&request=DescribeFeatureType&version=1.0.0'.
Skipping the import.<br><br>I also tried the wfs-t with QGIS so that to make sure it is not an issue with the configuration in client side, but still the same error, which is only in inserting. The update and delete work like a charm...<br><br>Now I am feeling too dummy and desperate since all the previous posts say that the error is in configuration, but the config.xml seems OK to me. The only thing I can think is that I have issues with the schemas defined in tinyows, although I have replaced them several times with other versions found in github and elsewhere in internet...<br><br><br><br></font><div><hr id="stopSpelling">From: erndal02@hotmail.com<br>To: tinyows-dev@lists.maptools.org<br>Subject: RE: [TinyOWS-dev] Error when inserting new feature with TinyOWS<br>Date: Wed, 9 May 2012 21:35:30 +0200<br><br>
<style><!--
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Tahoma;}
--></style>
<div dir="ltr">
By the way, I am using PostGIS 1.5.3 version, installed with PostgreSQL 9.1<br><br>The 2.0.0. version of PostGIS I read that it officially came out on May 2012. I don't think I need to upgrade the version of PostGIS, but may it be this the case of my errors?<br><br><div><div id="ecxSkyDrivePlaceholder"></div><hr id="ecxstopSpelling">From: erndal02@hotmail.com<br>To: tinyows-dev@lists.maptools.org<br>Date: Wed, 9 May 2012 21:03:00 +0200<br>Subject: Re: [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,<br><br>I made another try, by adding this statement in config.xml: <br>check_schema="0"<br>so that to avoid the schema validation.<br><br>Now, another weird thing seems to be happening, taken from the log file of tinyows:<br>1. [Wed May 09 20:53:28 2012] [SQL] BEGIN;<br>2. [Wed May 09 20:53:28 2012] [SQL] SELECT nextval('public.olives_fid_seq');<br>3. [Wed May 09 20:53:28 2012] [SQL] SELECT ST_GeomFromGML('<gml:MultiPolygon xmlns:gml="http://www.opengis.net/gml" xmlns:feature="http://127.0.0.1:81/" xmlns:wfs="http://www.opengis.net/wfs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" srsName="EPSG:32634"><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates decimal="." cs="," ts=" ">380328.125,4508968.75 380375,4508500 381250,4509093.75 381046.875,4509328.125 380328.125,4508968.75</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember></gml:MultiPolygon>')<br>4. [Wed May 09 20:53:28 2012] [SQL] SELECT ST_IsValid('01060000207A7F0000010000000103000000010000000500000000000080A0361741000000304A335141000000005C37174100000000D53251410000000008451741000000706933514100000080DB41174100000008A433514100000080A0361741000000304A335141')<br>5. [Wed May 09 20:53:28 2012] [SQL] <br>6. [Wed May 09 20:53:28 2012] [SQL] ROLLBACK;<br><br>If I try to insert directly the geometry as it is in row 3 of the log file, from postGIS, the feature is inserted in the database. So it looks like the geometry is OK. But I just cannot understand the row 5, why should it be empty, and also the row number 6 which just say "rollback". Meanwhile, if I run the query in row 4 in postgis, the result is true, which means the geometry is valid <br><br>The most important thing is that I still cannot add a feature from tinyows...<br><br>I would appreciate a lot some help on this issue...<br><br>Thanks<br><br><div><div id="ecxSkyDrivePlaceholder"></div><hr id="ecxstopSpelling">From: erndal02@hotmail.com<br>To: tinyows-dev@lists.maptools.org<br>Date: Wed, 9 May 2012 10:03:00 +0200<br>Subject: Re: [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,<br><br>> You can't have success with WFS 1.1.0 because your geometry is in GML2<br>> <gml:coordinates<br>>
However, you had some other problem too with the schema location. I
can't say anything about that. Anyway, be sure to use GML2 with WFS
1.0.0 and GML3 with WFS 1.1.0.<br><br>Thanks for your answer. I wasn't sure if I could use the WFS 1.1.0, so now I am sure that I cannot.<br><br>Anyway I still have the same error, but I see in the log files one more error which says:<br><font style="" face="Courier New">[ERROR] Element '{http://www.w3.org/2001/XMLSchema}import': Failed to locate a schema at location 'http://localhost:81/cgi-bin/tinyows.exe?service=WFS&request=DescribeFeatureType&version=1.0.0'. Skipping the import.</font><br><br>If I try the URL in the browser it gives me the whole schema for the layer, and it's something like this:<br><br><font style="" face="Courier New"><?xml version='1.0' encoding='UTF-8'?></font><font style="" face="Courier New"><br></font><font style="" face="Courier New"><xs:schema targetNamespace='http://www.tinyows.org/' xmlns:tows='http://www.tinyows.org/' xmlns:ogc='http://www.opengis.net/ogc' xmlns:xs='http://www.w3.org/2001/XMLSchema' xmlns='http://www.w3.org/2001/XMLSchema' xmlns:gml='http://www.opengis.net/gml' elementFormDefault='qualified' version='1.0'></font><font style="" face="Courier New"><br></font><font style="" face="Courier New"><xs:import namespace='http://www.opengis.net/gml' schemaLocation='http://schemas.opengis.net/gml/2.1.2/feature.xsd'/></font><font style="" face="Courier New"><br></font><font style="" face="Courier New"><xs:element name='olives' type='tows:olivesType' substitutionGroup='gml:_Feature' /></font><font style="" face="Courier New"><br></font><font style="" face="Courier New"><xs:complexType name='olivesType'></font><font style="" face="Courier New"><br></font><font style="" face="Courier New"> <xs:complexContent></font><font style="" face="Courier New"><br></font><font style="" face="Courier New"> <xs:extension base='gml:AbstractFeatureType'></font><font style="" face="Courier New"><br></font><font style="" face="Courier New"> <xs:sequence></font><font style="" face="Courier New"><br></font><font style="" face="Courier New"> <xs:element name ='rrethid' type='int' nillable='true' minOccurs='0' maxOccurs='1'/></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><font style="" face="Courier New"><br></font><font style="" face="Courier New"> </xs:sequence></font><font style="" face="Courier New"><br></font><font style="" face="Courier New"> </xs:extension></font><font style="" face="Courier New"><br></font><font style="" face="Courier New"> </xs:complexContent></font><font style="" face="Courier New"><br></font><font style="" face="Courier New"></xs:complexType></font><font style="" face="Courier New"><br></font><font style="" face="Courier New"></xs:schema></font><br><br><br>I think the error should be somewhere in the schema folder within tinyows folder that I have (but not sure at all). Anyway if someone could tell me where to get the latest schema folder version of TinyOWS, I can try to replace them, and see if the error is there.<br><br>Also, if the error is at the schema, why shouldn't if fire also when editing/deleting a feature?<br><br>Thanks<br><br><div><div id="ecxSkyDrivePlaceholder"></div>> From: Jukka.Rahkonen@mmmtike.fi<br>> To: tinyows-dev@lists.maptools.org<br>> Date: Tue, 8 May 2012 19:34:43 +0000<br>> Subject: Re: [TinyOWS-dev] Error when inserting new feature with TinyOWS<br>> <br>> Hi,<br>> <br>> You can't have success with WFS 1.1.0 because your geometry is in GML2<br>> <gml:coordinates<br>> However, you had some other problem too with the schema location. I can't say anything about that. Anyway, be sure to use GML2 with WFS 1.0.0 and GML3 with WFS 1.1.0.<br>> <br>> -Jukka Rahkonen-<br>> <br>> Ermond Parllaku wrote:<br>> <br>> > 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>> [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 )<br>> <br>> Just before the error, in the log file I see this query:<br>> <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"><br>> <wfs:Insert><br>> <feature:olives xmlns:feature="http://www.tinyows.org/"><br>> <feature:geometry><br>> <gml:MultiPolygon xmlns:gml="http://www.opengis.net/gml" srsName="EPSG:32634"><br>> <gml:polygonMember><br>> <gml:Polygon><br>> <gml:outerBoundaryIs><br>> <gml:LinearRing><br>> <gml:coordinates decimal="." cs="," ts=" ">381781.25,4509578.125 381875,4509031.25 382656.25,4509734.375 381781.25,4509578.125</gml:coordinates><br>> </gml:LinearRing><br>> </gml:outerBoundaryIs><br>> </gml:Polygon><br>> </gml:polygonMember><br>> </gml:MultiPolygon><br>> </feature:geometry><br>> </feature:olives><br>> </wfs:Insert><br>> </wfs:Transaction><br>> <br>> <br>> The config.xml is like this:<br>> <tinyows online_resource="http://localhost:81/cgi-bin/tinyows.exe"<br>> schema_dir="C:/ms4w/apps/tinyows/schema/"<br>> log="C:/ms4w/apps/tinyows/tinyows.log"<br>> log_level="15"><br>> <pg host="127.0.0.1" user="postgres" password="***" dbname="olives_gis1" port="5432"/><br>> <metadata name="Olives WFST Server"<br>> title="WFST Olives" /><br>> <br>> <layer retrievable="1"<br>> writable="1"<br>> ns_prefix="tows"<br>> ns_uri="http://www.tinyows.org/"<br>> //srid="EPSG:32634"<br>> name="olives"<br>> title="olives"/><br>> </tinyows><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>> var draw = new OpenLayers.Control.DrawFeature(<br>> wfs, OpenLayers.Handler.Polygon,<br>> {<br>> title: "Add olives",<br>> displayClass: "olControlDrawFeaturePolygon",<br>> multi: "true",<br>> id: "draw"<br>> }<br>> );<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>> _______________________________________________<br>> TinyOWS-dev mailing list<br>> TinyOWS-dev@lists.maptools.org<br>> http://lists.maptools.org/mailman/listinfo/tinyows-dev<br></div>                                            </div>
<br>_______________________________________________
TinyOWS-dev mailing list
TinyOWS-dev@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tinyows-dev</div>                                            </div>
<br>_______________________________________________
TinyOWS-dev mailing list
TinyOWS-dev@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tinyows-dev</div>                                            </div></div>                                            </div></body>
</html>