[Users] Changing feature attributes through WFS-T

Pablo Pérez Diez pablo.fnk.foncas at gmail.com
Tue Jul 9 12:51:55 CEST 2013


Thanks for your help but this isn't the problem because is working in the
example without the http and the url without the namespace because I say it
in the featureNS field, besides, there isn't layers property in OpenLayers.
Protocol.WFS.

Could the problem be that I'm loading the layers with WMS and not with WFS?


2013/7/9 "Christian Röttger" <cromail at gmx.de>

> Maybe your feauture namespace is wrong, without the http?
> url: '/geoserver/namespace/wfs',
> layers : layername,
>
>  (on localhost)
>
>
> *Gesendet:* Montag, 08. Juli 2013 um 17:31 Uhr
> *Von:* "Pablo Pérez Diez" <pablo.fnk.foncas at gmail.com>
> *An:* users at geoext.org
> *Betreff:* [Users] Changing feature attributes through WFS-T
>     Hi,
>
> I've a map generated through OpenLayers. I'm using GeoExt to generate a
> tree of layers loaded from Geoserver that at the same time is loaded from a
> PostGIS database. I've developed that when the user click over the layer in
> the map a popup is displayed with the feature information, then I've added
> a button to the popup because of the user change some value of the feature
> to save it in the database.
>
> However, it isn't working:
>
> To show the feature information in the popup I call to the function
> OpenLayers.Control.WMSGetFeatureInfo and It wait the event
> "getfeatureinfo". So, once the user click in the layer the popup is
> displayed with the save button. The user click in the button and the
> handler event is triggered with the next code:
>
> var capa = new OpenLayers.Protocol.WFS({
>     url: "/geoserver/ows",
>     version: "1.1.0",
>     featureType: "aicp",
>     featureNS: "http://OceanliderRestricciones",
>     srsName: "EPSG:4326"
> });
>
> capa.commit(e.features);
>
> "aicp" is the name of the layer I'm using to test it.
> "http://OceanliderRestricciones" is the URI of the workspace.
> "e" is the variable received as parameter when "getfeatureinfo" event is
> triggered.
>
> A post request is send with the next content:
>
> <wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs" service="WFS"
> version="1.1.0" xsi:schemaLocation="http://www.opengis.net/wfs
> http://schemas.opengis.net/wfs/1.1.0/wfs.xsd" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance">
> </wfs:Transaction>
>
> This is wrong because it hasn't what to do, I mean, It isn't saying what
> to do (update, insert, delete).
>
> I would appreciate your help.
>
> Thanks,
>
> FNK.
>
> PD: I've used this tutorial: *
> http://workshops.opengeo.org/geoext/wfs/wfst.html*
> It works but I don't know how to adapt it to my code.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20130709/e272e8b5/attachment.htm 


More information about the Users mailing list