[OpenLayers-Users] Adding new features: WFS-T PostGIS
Juan Arévalo
arevaco90 at yahoo.es
Wed Aug 19 15:33:40 EDT 2009
Hi All,
I am trying to set up a WFS-T using Geoserver 1.7.6 and PostGres 8.4. I have
tried with the following code in order to insert new features:
//WFS LAYER:
wfs = new OpenLayers.Layer.WFS(
"Cities",
"http://localhost:8080/geoserver/wfs",
{typename: 'cite:ciudades'},
{featureNS: 'http://www.opengeospatial.net/cite',
srsName: 'EPSG:4326',
version: "1.0.0",
//schema:
"http://localhost:8080/geoserver/wfs?request=GetFeature&typeName=ciudades&outputformat=text/xml;%20subtype=gml/3.1.1",
//schema:
"http://localhost:8080/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=cite:ciudades",
schema:
"http://127.0.0.1:8080/geoserver/wfs?service=WFS&version=1.1.0&request=DescribeFeatureType&typeName=cite:ciudades",
extractAttributes: true});
wfs.style = OpenLayers.Util.applyDefaults({strokeColor: "#0000ff"},
OpenLayers.Feature.Vector.style["default"]);
//SAVE BUTTON:
var save = new OpenLayers.Control.Button({
trigger: OpenLayers.Function.bind(wfs.commit, wfs),
displayClass: "olControlSaveFeatures"
});
When I click the save button I got this error:
WFS Transaction: FAILED <?xml version="1.0" ?>
<ServiceExceptionReport
version="1.2.0"
xmlns="http://www.opengis.net/ogc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/ogc
http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd">
<ServiceException>
Feature type 'featureMember' is not available:
</ServiceException></ServiceExceptionReport>
The geoserver log is as follow:
2009-08-19 20:57:35,500 ERROR [geoserver.ows] -
org.geoserver.wfs.WFSTransactionException: Feature type 'featureMember' is
not available:
at org.geoserver.wfs.Transaction.execute(Transaction.java:222)
at org.geoserver.wfs.Transaction.transaction(Transaction.java:108)
at
org.geoserver.wfs.DefaultWebFeatureService.transaction(DefaultWebFeatureService.java:182)
(...)
Does anyone have any idea on how to solve this issue?
It would be great if you can provide me with some working examples..
Thanks:)-
Juan
--
View this message in context: http://n2.nabble.com/Adding-new-features%3A-WFS-T-PostGIS-tp3474825p3474825.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list