Hi,
There is something odd happening now. I made a fresh installation with 2.4.1 Windows installer and executed the WFS_transactioInsert.xml demo request. The request itself is a WFS 1.0.0 Insert and the geometry in the request if GML 2 MultiLineString with “gml:coordinates”. However, Geoserver console log really claims that the input format is GML 3.1.1 as you can see:
Request: transaction
service = WFS
version = 1.0.0
baseUrl = http://localhost:8080/geoserver/
group[0] = wfs:insert=net.opengis.wfs.impl.InsertElementTypeImpl@anonymised.com (fe
ature: [SimpleFeatureImpl:tasmania_roads=[SimpleFeatureImpl.Attribute: the_geom<
the_geom id=fid–599419b8_141eef14e23_-8000>=MULTILINESTRING ((494475.71056415 5
433016.8189323, 494982.70115662 5435041.95096618)), SimpleFeatureImpl.Attribute:
TYPE=alley]], handle: null, idgen: <un
, inputFormat: , srsName: null)
insert[0]:
feature[0] = SimpleFeatureImpl:tasmania_roads=[SimpleFeatureImpl.Attribu
te: the_geom<the_geom id=fid–599419b8_141eef14e23_-8000>=MULTILINESTRING ((4944
75.71056415 5433016.8189323, 494982.70115662 5435041.95096618)), SimpleFeatureIm
pl.Attribute: TYPE=alley]
idgen = GenerateNew
inputFormat = text/xml; subtype=gml/3.1.1
releaseAction = ALL
-Jukka Rahkonen-
···
Hakala Oiva wrote:
Hi Andrea again
You said:
- writing GML2 geometries in a WFS 1.1 transaction, or GML3 geometries in a WFS 1.0 transaction
My Geoserver log says:
service = WFS
version = 1.0.0
baseUrl = http://localhost:8080/geoserver/
…
idgen = GenerateNew
inputFormat = text/xml; subtype=gml/3.1.1
releaseAction = ALL
So if I am right, the reason is GML 3.11 against WFS 1.0.0 ?
How to change this? Some way to configure Geoserver?
Oiva
Lähettäjä: Hakala Oiva (MTT) [oiva.hakala@anonymised.com]
Lähetetty: 24. lokakuuta 2013 12:11
Vastaanottaja: Andrea Aime
Kopio: GeoServer Mailing List List
Aihe: Re: [Geoserver-users] WFS-T and database?
Ok, but what should be the solution? I am creating a point, and the table expects a point, so that is OK?
I don’t know about GML-versions. I cannot affect how the app itself handles GML versions and WFS-transaction versions. The database is posgresql 9.1 with postgis 2. So what to do?
Oiva
Lähettäjä: andrea.aime@anonymised.com [andrea.aime@anonymised.com] käyttäjän Andrea Aime [andrea.aime@anonymised.com] puolesta
Lähetetty: 24. lokakuuta 2013 11:51
Vastaanottaja: Hakala Oiva (MTT)
Kopio: GeoServer Mailing List List
Aihe: Re: [Geoserver-users] WFS-T and database?
On Thu, Oct 24, 2013 at 9:59 AM, Hakala Oiva (MTT) <oiva.hakala@anonymised.com> wrote:
Thanks Andrea
There is a field gid, which is the primary key. Geoserver adds an empty record to my database with this problematic app. And if I put temporarily some extra code to the handler
feature.attributes.city_name = “new”;
feature.attributes.admin_name = “something”;those attributes are saved to a new record ok, but not the location. Strange???
Ah ok, the most common reason for this is that you’re posting the geometry in the wrong GML version, or the geometry is otherwise
incompatible with the type in the database. For example:
-
writing GML2 geometries in a WFS 1.1 transaction, or GML3 geometries in a WFS 1.0 transaction
-
wriging a Point, when the database expects a Polygon
Cheers
Andrea
–
==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.
==
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://twitter.com/geosolutions_it