[mapserver-users] [tinyOWS]Trouble with feature insertion

Vlad Gapchich gavlig at gmail.com
Fri Mar 22 03:09:32 PDT 2013


Thank you all guys for your support! :) I've found the answer - it was a
slash at the end of wfs:Transaction openning tag(i have no idea how it got
there).

Anyways, i'll leave here a working example of insert request just in case:

<wfs:Transaction service='WFS' version='1.1.0' xmlns:wfs='
http://www.opengis.net/wfs' xmlns:gml='http://www.opengis.net/gml'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:map='
http://www.tinyows.org/map' xsi:schemaLocation='
http://schemas.opengis.net/wfs/1.1.0/WFS-transaction.xsd'
map:schemaLocation='
http://127.0.0.1/cgi-bin/tinyows?service=WFS&request=DescribeFeatureType&version=1.1.0'>
<wfs:Insert> <map:nodes> <map:coord> <gml:Point srsDimension='2'
srsName='urn:x-ogc:def:crs:EPSG:4326'> <gml:pos srsDimension='2'>30.454343
50.447954</gml:pos> </gml:Point> </map:coord> </map:nodes> </wfs:Insert>
</wfs:Transaction>

P.S.

Changes i made:
Thanks to Andreas Eichner - escaping character in map:schemaLocation,
to Rahkonen Juka - gml2 -> gml3 in gml:Point
- separate schemaLocation for map(don't even know what i was thinking
before)

And for Serge Dikiy my config.xml:
<tinyows online_resource="http://127.0.0.1/cgi-bin/tinyows"
schema_dir="/usr/local/share/tinyows/schema/" log="/var/log/tinyows.log"
log_level="15" check_schema="0"> <pg host="127.0.0.1" user="someuser"
password="somepassword dbname="somedb" port="2345"/> <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="map" ns_uri="http://www.tinyows.org/map" name="nodes"
title="Title" /> </tinyows>

And i forgot to mention before that i use ubuntu 12.10 as an os


2013/3/22 Rahkonen Jukka <jukka.rahkonen at mmmtike.fi>

> Hi,
>
> If you are on Windows you may not success. At least the version which is
> available for MS4W has a bug and it does not do inserts.
> One error I can see in your request is that it is using geometry in GML2
> style with WFS 1.1.0. I would be at least a good habit to use gml:pos
> there. This insert works for me on Linux.
>
> <?xml version='1.0' encoding='ISO-8859-1'?>
> <wfs:Transaction version='1.1.0' service='WFS'
> xmlns:gml='http://www.opengis.net/gml'
> xmlns:ogc='http://www.opengis.net/ogc'
> xmlns:wfs='http://www.opengis.net/wfs'
> xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
> xsi:schemaLocation='http://www.opengis.net/wfs/1.1.0/WFS-transaction.xsd'
> xmlns:lv='http://latuviitta.fi/'  >
> <wfs:Insert handle='insert1' idgen='GenerateNew' >
> <lv:editable_points>
> <lv:geom>
> <gml:Point xmlns:gml="http://www.opengis.net/gml"
> srsName="urn:ogc:def:crs:EPSG::3067" srsDimension="2">
> <gml:pos srsDimension="2"> -160567.85652445967 5936050.398293516
> </gml:pos>
> </gml:Point>
> </lv:geom>
> </lv:editable_points>
> </wfs:Insert>
> </wfs:Transaction>
>
>
> -Jukka Rahkonen
>
>
> Eichner, Andreas wrote:
> >
> >
> > Try escaping the '&' in the schema location URL as '&' as otherwise
> it
> > would be interpreted as an enity. And schemaLocation should be a list of
> > pairs of namespace name and location. It's probably a good idea to
> validate
> > the request document before posting it to TinyOWS...
> >
> > > The request i send looks like this:
> > >
> > > <wfs:Transaction
> > >   service='WFS'
> > >   version='1.1.0'
> > >   xmlns:wfs='http://www.opengis.net/wfs'
> > >   xmlns:gml='http://www.opengis.net/gml'
> > >   xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
> > >   xmlns:map='http://www.tinyows.org/map'
> > >   xsi:schemaLocation='http://www.opengis.net/wfs
> > >
> > > http://schemas.opengis.net/wfs/1.1.0/WFS-transaction.xsd
> > >
> > > http://127.0.0.1/cgi-bin/tinyows?service=WFS&request=DescribeF
> > eatureType&version=1.1.0'/>
> > >   <wfs:Insert>
> > >     <map:nodes>
> > >       <map:coord>
> > >         <gml:Point srsDimension='2'
> > > srsName='urn:x-ogc:def:crs:EPSG:4326'>
> > >           <gml:coordinates decimal='.' cs=',' ts='
> > > '>30.454343,50.447954</gml:coordinates>
> > >         </gml:Point>
> > >       </map:coord>
> > >     </map:nodes>
> > >   </wfs:Insert>
> > > </wfs:Transaction>
> > _______________________________________________
> > mapserver-users mailing list
> > mapserver-users at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/mapserver-users
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20130322/cfea6d1e/attachment-0001.html>


More information about the mapserver-users mailing list