Thank you Jukka. You got the same results as I did.

I have tried to find a workaround; a way to define that inputFormat in my code, 
but I haven't found yet.

I found this: use="optional" default="text/xml; subtype=gml/3.1.1"
but I don't know where to put it in my code (must also change gml-version)

Oiva Hakala
________________________________
Lähettäjä: Rahkonen Jukka [[email protected]]
Lähetetty: 25. lokakuuta 2013 12:36
Vastaanottaja: '[email protected]'
Aihe: Re: [Geoserver-users] WFS-T and database?

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@1d1f907 (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<TYPE id=fid--599419b8_141eef14e23_-8000>=alley]], handle: null, idgen: <un
set>, inputFormat: <unset>, 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<TYPE id=fid--599419b8_141eef14e23_-8000>=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) [[email protected]]
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ä: [email protected]<mailto:[email protected]> 
[[email protected]] käyttäjän Andrea Aime [[email protected]] 
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) 
<[email protected]<mailto:[email protected]>> 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://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to