[TinyOWS-dev] Error when inserting new feature with TinyOWS

Ermond Parllaku erndal02 at hotmail.com
Fri May 11 13:02:26 EST 2012


Could my errors come from the fact that tinyows.exe might be an older version compared to the files (e.g. schema files) found in the latest release (1.0.0rc4).I am using the tinyows.exe that is found in the mapserver site, which I think it's of version 1.0.0rc3.
If this might be a problem can anyone tell me where to get the tinyows.exe file for the latest version, since I don't know how to compile the source code found in the release? My experience unfortunately is limited to Microsoft technologies (Visual Studio and so on)

From: erndal02 at hotmail.com
To: tinyows-dev at lists.maptools.org
Subject: RE: [TinyOWS-dev] Error when inserting new feature with TinyOWS
Date: Fri, 11 May 2012 19:21:55 +0200





OK, maybe I should start from the beginning in the desperate need for some help, because I don't think it should be such a difficult situation for the experts. I'm not going to mention my failed attempts with OpenLayers, just with QGis and MS4W and TinyOWS

I have created one table in the database (schema: public) named olivestwo. This table has only two columns named fid (primary key, serial) and another one named geometry (geometry, type: POLYGON, srid: 32634). I have copied the XSD schema and everything else from the last release of TinyOWS. I have configured the config.xml like this:

<tinyows online_resource="http://127.0.0.1:81/cgi-bin/tinyows.exe"
  schema_dir="C:/ms4w/apps/tinyows/schema/"
  check_schema="0"
         log="C:/ms4w/apps/tinyows/tinyows.log"
         log_level="15">
  <pg host="127.0.0.1" user="postgres" password="olives001" dbname="olives_gis1" port="5432"/>
  <metadata name="Olives WFST Server"
         title="WFST Olives" />

  <layer retrievable="1"
         writable="1"
         ns_prefix="tows"
         ns_uri="http://127.0.0.1:81/"
         name="olivestwo"
         schema="public"
         title="olives test test"/>
</tinyows>


I have configured the httpd_tinyows.conf within httpd.d folder, like this:

SetEnv TINYOWS_CONFIG_FILE "C:/ms4w/apps/tinyows/config.xml"
SetEnv TINYOWS_SCHEMA_DIR "C:/ms4w/apps/tinyows/schema/"

<Directory "C:/ms4w/apps/tinyows/">
  AllowOverride None
  Options Indexes FollowSymLinks Multiviews 
  Order allow,deny
  Allow from all
</Directory>

The editing and deleting of existing features works very well.

If I try with this configuration, to insert a new feature from QGis, I get this from the log file:

[QUERY] <Transaction xmlns="http://www.opengis.net/wfs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0.0" service="WFS" xsi:schemaLocation="http://127.0.0.1:81/ http://127.0.0.1:81/cgi-bin/tinyows.exe?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=DescribeFeatureType&amp;TYPENAME=tows:olivestwo&amp;SRSNAME=EPSG:32634" xmlns:tows="http://127.0.0.1:81/"><Insert xmlns="http://www.opengis.net/wfs"><olivestwo xmlns="http://127.0.0.1:81/"><geometry xmlns="http://127.0.0.1:81/"><Polygon xmlns="http://www.opengis.net/gml" srsName="EPSG:32634"><outerBoundaryIs xmlns="http://www.opengis.net/gml"><LinearRing xmlns="http://www.opengis.net/gml"><coordinates xmlns="http://www.opengis.net/gml" cs="," ts=" ">379105.5268,4513275.2700 378342.3352,4513020.8728 378342.3352,4513020.8728 378342.3352,4513020.8728 378482.2536,4512448.4791 378482.2536,4512448.4791 379041.9275,4512677.4366 379105.5268,4513275.2700</coordinates></LinearRing></outerBoundaryIs></Polygon></geometry></olivestwo></Insert></Transaction>
[SQL] BEGIN;
[SQL] SELECT nextval('public.olives2_fid_seq');
[SQL] SELECT ST_GeomFromGML('<Polygon xmlns="http://www.opengis.net/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tows="http://127.0.0.1:81/" srsName="EPSG:32634"><outerBoundaryIs xmlns="http://www.opengis.net/gml"><LinearRing xmlns="http://www.opengis.net/gml"><coordinates xmlns="http://www.opengis.net/gml" cs="," ts=" ">379105.5268,4513275.2700 378342.3352,4513020.8728 378342.3352,4513020.8728 378342.3352,4513020.8728 378482.2536,4512448.4791 378482.2536,4512448.4791 379041.9275,4512677.4366 379105.5268,4513275.2700</coordinates></LinearRing></outerBoundaryIs></Polygon>')
[SQL] SELECT ST_IsValid('01030000207A7F000001000000080000008E75711B8623174114AE47D17E37514136AB3E579917174188F4DB373F37514136AB3E579917174188F4DB373F37514136AB3E579917174188F4DB373F375141E9B7AF03C91917410C93A91EB0365141E9B7AF03C91917410C93A91EB03651415C8FC2B5872217412041F15BE93651418E75711B8623174114AE47D17E375141')
[SQL] 
[SQL] ROLLBACK;

If I try to run the ST_IsValid function from PostGIS, it returns 't', meaning that the geometry validates OK.
The transaction query seems to be well formed (at least from what I can see).

If in the config file I try to change the check_schema to "1", I get the following info from the log file:

[EVENT] == FCGI START ==
[QUERY] <Transaction xmlns="http://www.opengis.net/wfs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0.0" service="WFS" xsi:schemaLocation="http://127.0.0.1:81/ http://127.0.0.1:81/cgi-bin/tinyows.exe?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=DescribeFeatureType&amp;TYPENAME=tows:olivestwo&amp;SRSNAME=EPSG:32634" xmlns:tows="http://127.0.0.1:81/"><Insert xmlns="http://www.opengis.net/wfs"><olivestwo xmlns="http://127.0.0.1:81/"><geometry xmlns="http://127.0.0.1:81/"><Polygon xmlns="http://www.opengis.net/gml" srsName="EPSG:32634"><outerBoundaryIs xmlns="http://www.opengis.net/gml"><LinearRing xmlns="http://www.opengis.net/gml"><coordinates xmlns="http://www.opengis.net/gml" cs="," ts=" ">375264.1291,4513249.8303 375391.3277,4512753.7557 376052.7604,4513364.3090 375264.1291,4513249.8303</coordinates></LinearRing></outerBoundaryIs></Polygon></geometry></olivestwo></Insert></Transaction>
[ERROR] Element '{http://www.w3.org/2001/XMLSchema}import': Failed to locate a schema at location 'http://127.0.0.1:81/cgi-bin/tinyows.exe?service=WFS&request=DescribeFeatureType&version=1.0.0'. Skipping the import.

[ERROR] Element '{http://127.0.0.1:81/}olivestwo': This element is not expected. Expected is one of ( {http://www.opengis.net/gml}_Feature, {http://www.opengis.net/wfs}FeatureCollection ).

[ERROR] XML request isn't valid


I have made several tries with different layers, even with the ones from the release and I always have had the same results. I have also changed the ns_uri in config.xml to http://tinyows.org/ and still the same results...

Can anyone tell me if I am doing something wrong? Has anyone made it work with the MS4W in Windows?


 		 	   		   		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/tinyows-dev/attachments/20120511/6cc88cf3/attachment-0001.htm 


More information about the TinyOWS-dev mailing list