[Geoserver-users] wfs-t insert error

Hi!

I’m trying to insert a polygon into a PostgreSQL 8.3/PostGIS 1.3.5 database through a wfs-t request via GeoServer 1.7.2. using the following xml body:

<wfs:Transaction service=“WFS” version=“1.0.0”
xmlns:wfs=“http://www.opengis.net/wfs"<br>xmlns:topp=“http://www.openplans.org/topp”<br>xmlns:gml=“http://www.opengis.net/gml”<br>xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”<br>xsi:schemaLocation="http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd
http://www.openplans.org/topp
http://172.17.1.25:8082/geoserver/wfs/DescribeFeatureType?typename=topp:editable_polygon”>
wfs:Insert
topp:editable_polygon
topp:the_geom
<gml:MultiPolygon srsName=“http://www.opengis.net/gml/srs/epsg.xml#27492”>
gml:polygonMember
gml:Polygon
gml:outerBoundaryIs
gml:LinearRing
<gml:coordinates decimal=“.” cs=“,” ts=" ">
-12500,127000 -10000,127000 -10000,128000 -12500,127000 -12500,127000
</gml:coordinates>
</gml:LinearRing>
</gml:outerBoundaryIs>
</gml:Polygon>
</gml:polygonMember>
</gml:MultiPolygon>
</topp:the_geom>
</topp:editable_polygon>
</wfs:Insert>
</wfs:Transaction>

The transaction response is sussesfull, but the database field “the_geom” is empty.
Has anyone dealt with this issue or can help me to figure out what is happening?

Thank’s,
Gabriel Nolasco

Veja quais são os assuntos do momento no Yahoo! + Buscados: Top 10 - Celebridades - Música - Esportes

Gabriel Nolasco ha scritto:

Hi!

I'm trying to insert a polygon into a PostgreSQL 8.3/PostGIS 1.3.5 database through a wfs-t request via GeoServer 1.7.2. using the following xml body:

<wfs:Transaction service="WFS" version="1.0.0"
xmlns:wfs="http://www.opengis.net/wfs&quot;
xmlns:topp="http://www.openplans.org/topp&quot;
xmlns:gml="http://www.opengis.net/gml&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
xsi:schemaLocation="http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd
http://www.openplans.org/topp
http://172.17.1.25:8082/geoserver/wfs/DescribeFeatureType?typename=topp:editable_polygon&quot;&gt;
<wfs:Insert>
<topp:editable_polygon>
<topp:the_geom>
<gml:MultiPolygon srsName="http://www.opengis.net/gml/srs/epsg.xml#27492&quot;&gt;
<gml:polygonMember>
<gml:Polygon>
<gml:outerBoundaryIs>
<gml:LinearRing>
<gml:coordinates decimal="." cs="," ts=" ">
-12500,127000 -10000,127000 -10000,128000 -12500,127000 -12500,127000
</gml:coordinates>
</gml:LinearRing>
</gml:outerBoundaryIs>
</gml:Polygon>
</gml:polygonMember>
</gml:MultiPolygon>
</topp:the_geom>
</topp:editable_polygon>
</wfs:Insert>
</wfs:Transaction>

The transaction response is sussesfull, but the database field "the_geom" is empty.
Has anyone dealt with this issue or can help me to figure out what is happening?

The most common case is the xml being malformed some way, the
GeoServer parser is operating in loose mode by default, meaning
it will just skip what it cannot understand.
Try to enable "cite compatibilty hacks" in the wfs configuration
or just post your request to:
http://host:port/geoserver/ows?strict=true
to force XML validation of your request.

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.