Hi everyone,
Im trying to add one point to my Postgis 2.0 DB using Geoserver.
On Geoserver 2.4.3 I dont get any kind of error if I use postman on google chrome or from geoserver “Demo request”. After submit it loading forever.
I copy-paste the schemaLocation addres http://localhost:8080/geoserver/wfs/DescribeFeatureType?typename=app:fence_geometry on the browser and start loading forever to. This could be a bug?
I attached the xml request and the schema of the DB
<wfs:Transaction service=“WFS” version=“1.0.0”
xmlns:wfs=“http://www.opengis.net/wfs”
xmlns:app=“http://www.company.com/app”
xmlns:gml=“http://www.opengis.net/gml”
xmlns:ogc=“http://www.opengis.net/ogc”
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”
xsi:schemaLocation=“http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd http://www.company.com/app
http://localhost:8080/geoserver/wfs/DescribeFeatureType?typename=app:fence_geometry”>
wfs:Insert
app:fence_geometry
app:labelexamplePoint</app:label>
app:owner_id4</app:owner_id>
app:app_metadatatest</app:app_metadata>
app:geom
<gml:Point srsDimension=“2” srsName=“urn:x-ogc:def:crs:EPSG:4326”>
<gml:coordinates decimal=“.” cs=“,” ts=" ">60.1,60.2</gml:coordinates>
</gml:Point>
</app:geom>
</app:fence_geometry>
</wfs:Insert>
</wfs:Transaction>
Notice that the owner_id its not the ID of the table
CREATE TABLE fence_geometry
(
id BIGSERIAL NOT NULL,
label varchar(255) NOT NULL,
app_metadata text,
owner_id bigint NOT NULL,
CONSTRAINT fence_geometry_pkey PRIMARY KEY (id)
);
ALTER TABLE fence_geometry OWNER TO postgres;
CREATE INDEX fence_geometry_idx ON fence_geometry (id);
ALTER TABLE fence_geometry ADD COLUMN geom geometry(Geometry,4326);
Cheers
Emilio Recio
Cell: 549-351-2445659
Cordoba,Argentina

emilio.recio
I made it work! The first problem was that the on Postgres the AUTO_INCREMENT var on “id” on the table was 0 and I added manually 20 rows before, so when I tried to add a new row from Geoserver I had an error saying that the ID exists. So I run Postman 20 times until the counter of Postgres was finally the last element.
Second I remove the parameter.
The xsi:schemaLocation still occur.
Cheers
···
Emilio Recio
Cell: 549-351-2445659
Cordoba,Argentina

emilio.recio
On 7 January 2014 11:39, Emilio Recio <emiliorecio@anonymised.com> wrote:
Hi everyone,
Im trying to add one point to my Postgis 2.0 DB using Geoserver.
On Geoserver 2.4.3 I dont get any kind of error if I use postman on google chrome or from geoserver “Demo request”. After submit it loading forever.
I copy-paste the schemaLocation addres http://localhost:8080/geoserver/wfs/DescribeFeatureType?typename=app:fence_geometry on the browser and start loading forever to. This could be a bug?
I attached the xml request and the schema of the DB
<wfs:Transaction service=“WFS” version=“1.0.0”
xmlns:wfs=“http://www.opengis.net/wfs”
xmlns:app=“http://www.company.com/app”
xmlns:gml=“http://www.opengis.net/gml”
xmlns:ogc=“http://www.opengis.net/ogc”
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”
xsi:schemaLocation=“http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd http://www.company.com/app
http://localhost:8080/geoserver/wfs/DescribeFeatureType?typename=app:fence_geometry”>
wfs:Insert
app:fence_geometry
app:labelexamplePoint</app:label>
app:owner_id4</app:owner_id>
app:app_metadatatest</app:app_metadata>
app:geom
<gml:Point srsDimension=“2” srsName=“urn:x-ogc:def:crs:EPSG:4326”>
<gml:coordinates decimal=“.” cs=“,” ts=" ">60.1,60.2</gml:coordinates>
</gml:Point>
</app:geom>
</app:fence_geometry>
</wfs:Insert>
</wfs:Transaction>
Notice that the owner_id its not the ID of the table
CREATE TABLE fence_geometry
(
id BIGSERIAL NOT NULL,
label varchar(255) NOT NULL,
app_metadata text,
owner_id bigint NOT NULL,
CONSTRAINT fence_geometry_pkey PRIMARY KEY (id)
);
ALTER TABLE fence_geometry OWNER TO postgres;
CREATE INDEX fence_geometry_idx ON fence_geometry (id);
ALTER TABLE fence_geometry ADD COLUMN geom geometry(Geometry,4326);
Cheers
Emilio Recio
Cell: 549-351-2445659
Cordoba,Argentina

emilio.recio