Hi Tim, Thank you for opening the ticket, I will read the links on creating patches and attach one.
I need some additional help, as I think there is another problem with the wfs insert, only I do not know much about GML and WFS-T XML so it might be my lack of understanding. Sorry to paste the chuck of XML below, but it was generated by OpenLayers with the fix below incorporated and it is needed to discuss this issue. There is one each Update, Delete and Insert transaction. It seems to me that the Insert transaction is missing some needed nodes in the XML. Notice that Update and Delete both have typeName="Geofence" on their respective wfs:Update and wfs:Delete tags, but there is none on the wfs:Insert tag! This is needed to construct the feature:<typeName> tags in the wfs:Insert transactions. Likewise, wfs:Update has <wfs:Name>the_geom</wfs:Name> which is also missing from wfs:Insert and is needed to construct the <feature:the_geom> tag. Maybe these problems are because the namespace is not setup correctly for the wfs:Insert transaction. I would appreciate your time to look at this issue and thoughts. I almost have a working demo. I can hack the PHP parser and handler to hard these values, but it would be much better to resolve the issues for the future. Thanks, -Steve W. <wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs" version="1.0.0" service="WFS"> <wfs:Update typeName="Geofence"> <wfs:Property> <wfs:Name>the_geom</wfs:Name> <wfs:Value> <gml:Polygon xmlns:gml="http://www.opengis.net/gml"> <gml:outerBoundaryIs> <gml:LinearRing> <gml:coordinates decimal="." cs="," ts=" ">-119.460938,45.608398 -121.746094,45.608398 -121.921875,44.290039 -120.515625,42.268554875 -118.845703,44.37793 -119.460938,45.608398</gml:coordinates> </gml:LinearRing> </gml:outerBoundaryIs> </gml:Polygon> </wfs:Value> </wfs:Property> <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"> <ogc:FeatureId fid="9"/> </ogc:Filter> </wfs:Update> <wfs:Delete typeName="Geofence"> <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"> <ogc:FeatureId fid="25"/> </ogc:Filter> </wfs:Delete> <wfs:Insert> <feature:Geofence xmlns:feature="http://mapserver.gis.umn.edu/mapserver"> <feature:the_geom> <gml:MultiPolygon xmlns:gml="http://www.opengis.net/gml"> <gml:polygonMember> <gml:Polygon> <gml:outerBoundaryIs> <gml:LinearRing> <gml:coordinates decimal="." cs="," ts=" ">-110.056640625,46.3115234375 -110.232421875,44.3779296875 -106.8046875,43.8505859375 -107.595703125,47.5419921875 -110.056640625,46.3115234375</gml:coordinates> </gml:LinearRing> </gml:outerBoundaryIs> </gml:Polygon> </gml:polygonMember> </gml:MultiPolygon> </feature:the_geom> </feature:Geofence> </wfs:Insert> </wfs:Transaction> Tim Schaub wrote: > Hey- > > Stephen Woodbridge wrote: >> Stephen Woodbridge wrote: >>> Hi all, >>> >>> I ran into a strange case of the namespace for WFS being set wrong. I >>> think the fix follows based on reading the code. I have not had a chance >>> to patch and test it: >>> >>> http://trac.openlayers.org/browser/trunk/openlayers/lib/OpenLayers/Format/WFS.js >>> >>> rev.6313 >>> >>> L192: var deleteNode = this.createElementNS(this.featureNS, >>> 'wfs:Delete'); >>> >>> should be: >>> >>> var deleteNode = this.createElementNS(this.wfsns, 'wfs:Delete'); >>> >> Just verified that it fixes the problem that I was seeing. > > Thanks for the report. This looks like a clear typo. > > Adding a ticket to trac with a patch is the fastest way to get something > fixed. > > Please see http://trac.openlayers.org/wiki/FilingTickets which includes > a link to http://trac.openlayers.org/wiki/CreatingPatches. > > I've set up a ticket to address this: > http://trac.openlayers.org/ticket/1394 > > Tim > > >> -Steve >> _______________________________________________ >> Dev mailing list >> [email protected] >> http://openlayers.org/mailman/listinfo/dev >> >> !DSPAM:4033,47c4654115605210051143! >> > > _______________________________________________ > Dev mailing list > [email protected] > http://openlayers.org/mailman/listinfo/dev _______________________________________________ Dev mailing list [email protected] http://openlayers.org/mailman/listinfo/dev
