[mapserver-users] [TinyOWS] Inserting feature and XML schema validation

Тимур Галиаскарович Суфиев t.sufiev at acti.ru
Thu Nov 8 00:53:13 PST 2012


Hi, Olivier

Here is most part of my tinyows.xml (online_resource is ok, also I set check_schema to "0"):

<tinyows online_resource="http://localhost/mapserver/tinyows"
     schema_dir="/usr/local/share/tinyows/schema/"
     log="/tmp/tinyows.log"
     check_schema="0"
     log_level="15">
<pg host="localhost" user="timur" dbname="<some_db>" port="5432"/>
<metadata name="TinyOWS Server"
          title="TinyOWS Server - WFS-T Frida Service" />
<contact name="TinyOWS Server"
         site="http://www.tinyows.org/"
         email="tinyows-users at lists.maptools.org" />
<layer retrievable="1"
       writable="1"
       ns_prefix="tows"
       ns_uri="http://www.tinyows.org/"
       name="cities"
       title="Russian cities" />
</tinyows>

After disabling schema_check I get the following record in logfile:

[Thu Nov  8 12:42:15 2012] [EVENT] == Filling Storage ==
[Thu Nov  8 12:42:15 2012] [EVENT] == FCGI START ==
[Thu Nov  8 12:42:15 2012] [QUERY] <wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs" service="WFS" version="1.1.0" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd http://www.tinyows.org http://localhost/mapserver/tinyows?service=wfs&amp;request=DescribeFeatureType&amp;version=1.1.0&amp;typename=tows:cities" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><wfs:Insert><feature:cities xmlns:feature="http://www.tinyows.org"><feature:geom><gml:Point xmlns:gml="http://www.opengis.net/gml" srsName="EPSG:4326"><gml:pos>38.10537109375 55.365478515625</gml:pos></gml:Point></feature:geom><feature:pop_hk>99</feature:pop_hk><feature:city_name>Новый город</feature:city_name><feature:type_id>1</feature:type_id></feature:cities></wfs:Insert></wfs:Transaction>
[Thu Nov  8 12:42:15 2012] [SQL] BEGIN;
[Thu Nov  8 12:42:15 2012] [SQL] SELECT nextval('public.cities_obj_id_seq');
[Thu Nov  8 12:42:15 2012] [SQL] INSERT INTO "public"."cities" ("obj_id") VALUES ('693') 
[Thu Nov  8 12:42:15 2012] [SQL] COMMIT;
[Thu Nov  8 12:42:15 2012] [EVENT] == FCGI SHUTDOWN ==
[Thu Nov  8 12:42:15 2012] [EVENT] == TINYOWS SHUTDOWN ==

And that is not exactly the right thing because none of the 'cities' table's fields are filled (values for them are provided in query above).

I'm putting 'cities' table definition here for the whole picture:
-----------+------------------------+-------------------------------------------
 obj_id    | integer                | NOT NULL DEFAULT nextval('cities_obj_id_seq'::regclass)
 pop_hk    | integer                | 
 city_name | character varying(100) | 
 geom      | geometry(Point,4326)   | 
    "cities_pkey" PRIMARY KEY, btree (obj_id)
    "cities_type_id_fkey" FOREIGN KEY (type_id) REFERENCES types(type_id)

Best regards,
Timur Sufiev
  _____  

From: Olivier Courtin [mailto:olivier.courtin at gmail.com]
To: mapserver-users at lists.osgeo.org
Sent: Wed, 07 Nov 2012 21:24:24 +0300
Subject: Re: [mapserver-users] [TinyOWS] Inserting feature and XML schema validation

On Wed, Nov 7, 2012 at 5:13 PM, Тимур Галиаскарович Суфиев <t.sufiev at acti.ru> wrote:



Hi Timur,
   
This isn't the first question here about inserting features in TinyOWS, but I haven't found solution to my problem in archives.
  
and this xsd should make tinyows use element '{http://www.tinyows.org}cities' like '{http://www.opengis.net/gml}_Feature'
  
Where am I wrong and what should be changed in my setup?


Thanks for your detailled report,
first naive question, what about the tinyows.xml config file,
 and online_resource property ?
  
Next question, what happen, if you bypass schema validation, 
with: check_schema = "0"   (in tinyows element)

--
Olivier
      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20121108/210b7b48/attachment.html>


More information about the mapserver-users mailing list