Discussion:
[Geoserver-users] Openlayers + geoserver WFS-T
apogliaghi
2010-08-19 06:49:45 UTC
Permalink
Hi all,

I'm trying to use openlayers to edit features exported by geoserver via
WFS-T.
I was able to install and configure geoserver, I enabled wfs-t support (by
setting WFS type to "transactional" in the admin gui page).

To make sure everything was working fine before starting to play with
openlayers, I used uDig to remotely access to the exported layer via WFS-T
and
do some changes.
It worked alright.

Now I'm trying to achieve the same thing with openlayers: I am able to show
the
WFS layer on my map and edit it, but as soon as I try to commit my changes,
I
get an error from geoserver saying "geoserver could not locate featurestore
edit2".

This is my config in openlayers:
testWFS = new OpenLayers.Layer.Vector("edit2", {
strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy],
projection: new OpenLayers.Projection("EPSG:4326"),
protocol: new OpenLayers.Protocol.WFS({
version: "1.1.0",
srsName: "EPSG:4326",
url: "http://localhost:8080/geoserver/wfs",
featureNS : "and",
featureType: "edit2"
//geometryName: "the_geom"
//schema:
"http://localhost:8080/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=and:edit2"
})
});

Does anybody have any clue?
I'm using Openlayers 2.9 and Geoserver 2.0.1.

I think the problem is likely to be related to the featureNS... I dont
understand exactly what it is... I suppose it's the workspace, isn't it?
Any help appreciated.

Andrea
--
View this message in context: http://old.nabble.com/Openlayers-%2B-geoserver-WFS-T-tp29449271p29449271.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
Lennart Jütte
2010-08-19 07:28:45 UTC
Permalink
Forgot the list in CC...
Datum: 19. August 2010 09:28:11 MESZ
Betreff: Re: [Geoserver-users] Openlayers + geoserver WFS-T
Hi Andrea
featureNS ist the NameSpace of your workspace - the URL you entered when you created the NS.
HTH,
Lennart
Post by apogliaghi
Hi all,
I'm trying to use openlayers to edit features exported by geoserver via
WFS-T.
I was able to install and configure geoserver, I enabled wfs-t support (by
setting WFS type to "transactional" in the admin gui page).
To make sure everything was working fine before starting to play with
openlayers, I used uDig to remotely access to the exported layer via WFS-T
and
do some changes.
It worked alright.
Now I'm trying to achieve the same thing with openlayers: I am able to show
the
WFS layer on my map and edit it, but as soon as I try to commit my changes,
I
get an error from geoserver saying "geoserver could not locate featurestore
edit2".
testWFS = new OpenLayers.Layer.Vector("edit2", {
strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy],
projection: new OpenLayers.Projection("EPSG:4326"),
protocol: new OpenLayers.Protocol.WFS({
version: "1.1.0",
srsName: "EPSG:4326",
url: "http://localhost:8080/geoserver/wfs",
featureNS : "and",
featureType: "edit2"
//geometryName: "the_geom"
"http://localhost:8080/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=and:edit2"
})
});
Does anybody have any clue?
I'm using Openlayers 2.9 and Geoserver 2.0.1.
I think the problem is likely to be related to the featureNS... I dont
understand exactly what it is... I suppose it's the workspace, isn't it?
Any help appreciated.
Andrea
--
View this message in context: http://old.nabble.com/Openlayers-%2B-geoserver-WFS-T-tp29449271p29449271.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
------------------------------------------------------------------------------
This SF.net email is sponsored by
Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________
Geoserver-users mailing list
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Luca Morandini
2010-08-19 10:05:24 UTC
Permalink
Post by apogliaghi
testWFS = new OpenLayers.Layer.Vector("edit2", {
strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy],
projection: new OpenLayers.Projection("EPSG:4326"),
protocol: new OpenLayers.Protocol.WFS({
version: "1.1.0",
srsName: "EPSG:4326",
url: "http://localhost:8080/geoserver/wfs",
featureNS : "and",
featureType: "edit2"
//geometryName: "the_geom"
"http://localhost:8080/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=and:edit2"
})
});
You may try something like:
...
protocol: new OpenLayers.Protocol.WFS.v1_1_0({
url: "http://localhost:8080/geoserver/wfs",
featureType: "edit2",
featurePrefix: "and",
featureNS: "http://www.example.com/and",
srsName: "EPSG:4326"
})
...

(replace http://www.example.com/and with your type's URL).

Regards,

--------------------
Luca Morandini
www.lucamorandini.it
--------------------
apogliaghi
2010-08-17 15:03:42 UTC
Permalink
Hi all,

I'm trying to use openlayers to edit features exported by geoserver via
WFS-T.
I was able to install and configure geoserver, I enabled wfs-t support (by
setting WFS type to "transactional" in the admin gui page).

To make sure everything was working fine before starting to play with
openlayers, I used uDig to remotely access to the exported layer via WFS-T
and
did some changes.
It worked alright.

Now I'm trying to achieve the same thing with openlayers: I am able to show
the
WFs layer on my map and edit it, but as soon as I try to commit my changes,
I
get an error from geoserver saying "geoserver could not locate featurestore
edit2".

This is my config in openlayers:
testWFS = new OpenLayers.Layer.Vector("edit2", {
strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy],
projection: new OpenLayers.Projection("EPSG:4326"),
protocol: new OpenLayers.Protocol.WFS({
version: "1.1.0",
srsName: "EPSG:4326",
url: "http://localhost:8080/geoserver/wfs",
featureNS : "and",
featureType: "edit2"
//geometryName: "the_geom"
//schema:
"http://localhost:8080/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=and:edit2"
})
});

Does anybody have any clue?
I'm using Openlayers 2.9 and Geoserver 2.0.1.

I think the problem is likely to be related to the featureNS... I dont
understand exactly what it is... I suppose it's the workspace, isn't it?
Any help appreciated.

Andrea
--
View this message in context: http://old.nabble.com/Openlayers-%2B-geoserver-WFS-T-tp29449271p29449271.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
Andreas Hocevar
2010-08-22 12:14:53 UTC
Permalink
Hi,
Post by apogliaghi
I'm trying to use openlayers to edit features exported by geoserver via
WFS-T.
I was able to install and configure geoserver, I enabled wfs-t support (by
setting WFS type to "transactional" in the admin gui page).
To make sure everything was working fine before starting to play with
openlayers, I used uDig to remotely access to the exported layer via WFS-T
and
did some changes.
It worked alright.
Now I'm trying to achieve the same thing with openlayers: I am able to show
the
WFs layer on my map and edit it, but as soon as I try to commit my changes,
I
get an error from geoserver saying "geoserver could not locate featurestore
edit2".
testWFS = new OpenLayers.Layer.Vector("edit2", {
strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy],
projection: new OpenLayers.Projection("EPSG:4326"),
protocol: new OpenLayers.Protocol.WFS({
version: "1.1.0",
srsName: "EPSG:4326",
url: "http://localhost:8080/geoserver/wfs",
featureNS : "and",
featureType: "edit2"
//geometryName: "the_geom"
"http://localhost:8080/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=and:edit2"
})
});
Does anybody have any clue?
I'm using Openlayers 2.9 and Geoserver 2.0.1.
I think the problem is likely to be related to the featureNS... I dont
understand exactly what it is... I suppose it's the workspace, isn't it?
It is the namespace URI configured for the workspace. When you create a workspace in GeoServer, you will assign a URI to it. And this is what you use for featureNS above.

Regards,
Andreas.
Post by apogliaghi
Any help appreciated.
Andrea
--
View this message in context: http://old.nabble.com/Openlayers-%2B-geoserver-WFS-T-tp29449271p29449271.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
------------------------------------------------------------------------------
This SF.net email is sponsored by
Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________
Geoserver-users mailing list
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.
Loading...