1

I am trying to edit a WFS from geoserver (using PostGIS data) within QGIS.

This is the request as recorded by Fiddler

<Transaction xmlns="http://www.opengis.net/wfs"         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0.0" xmlns:NCT="nct"   service="WFS" xsi:schemaLocation="nct http://geonct.com:80/geoserver/NCT/wfs?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=DescribeFeatureType&amp;TYPENAME=NCT:vegetation&amp;SRSNAME=EPSG:3308&amp;username=******&amp;password=*******" xmlns:gml="http://www.opengis.net/gml"><Insert xmlns="http://www.opengis.net/wfs"><vegetation xmlns="nct"><veg_type xmlns="nct">erf</veg_type><nsw_status xmlns="nct">fse</nsw_status><comm_status xmlns="nct">fsef</comm_status><condition xmlns="nct">sef</condition><geom xmlns="nct"><gml:MultiPolygon srsName="EPSG:3308"><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates cs="," ts=" ">9316657.8686453141272068,4215674.37469049356877804 9319140.89504236727952957,4219581.4897564435377717 9325165.88556462526321411,4221553.30483645480126143 9332651.47984985634684563,4222466.182188312523067 9336302.98925728537142277,4222429.66709423810243607 9339333.74206545203924179,4222429.66709423810243607 9329876.33270020969212055,4224620.57273869588971138 9321623.92143941856920719,4224620.57273869588971138 9312787.26867344044148922,4224328.4519861014559865 9306616.21777488477528095,4223013.90859942696988583 9305666.82532895170152187,4222247.09162386693060398 9306470.15739858709275723,4222028.00105942133814096 9313298.47999048046767712,4223050.42369350139051676 9316657.8686453141272068,4222539.21237646136432886 9307821.21587933599948883,4220384.82182607799768448 9305812.8857052493840456,4219216.33881570026278496 9316657.8686453141272068,4215674.37469049356877804</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember></gml:MultiPolygon></geom>    </vegetation></Insert></Transaction>

and this is the response in the GeoServer logs

2014-11-14 04:27:10,429 WARN [geotools.xml] - Error parsing: http://geonct.com:80/geoserver/NCT/wfs?SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&TYPENAME=NCT:vegetation&SRSNAME=EPSG:3308&username=******&password=*******
2014-11-14 04:27:10,430 WARN [geotools.xml] - Could not find a schema
2014-11-14 04:27:10,446 INFO [geoserver.wfs] - 
Request: getServiceInfo
2014-11-14 04:27:10,447 INFO [geoserver.wfs] - 
Request: describeFeatureType
    service = WFS
    version = 1.0.0
    baseUrl = http://geonct.com:80/geoserver/
    typeName[0] = {nct}vegetation
    outputFormat = XMLSCHEMA

If anyone can provide any remedies for this, I have searched the net, played around with different datasets, different field names (caps, no caps). I'm out of ideas.

3
  • I can't find anything wrong in the Insert request and QGIS is known to work with GeoServer. I would make a new GeoServer intallation with all the default settings into localhost:8080. Next I would try to edit topp:states. Then I would create a new store from your PostGIS, put the states shapefile into PostGIS with shp2pgsql, make a layer from it and try to edit. If that's OK then I would make a layer from NCT:vegetation to the topp workspace and without security. If that still works it is a good start for testing with features which are different in real system: workspace, proxy, security... – user30184 Nov 14 '14 at 8:17
  • One thing to try is to send the POST request with some other tool and remove &SRSNAME=EPSG:3308& from the DescribeFeatureType part. WFS 1.0.0 does not officially support SRSNAME and it does not exist in WFS 1.0.0 schemas. If GeoServer verifies the schema that could be the reason for denial. GET requests are not qualified and therefore it does not proof anything that DescribeFeatureType works as it is from the browser. – user30184 Nov 14 '14 at 8:30
  • Tried using it locally and modified the srsname out of the POST request. Still nothing....i've seen a few people online have the same issues but never a solution. – lolcat Nov 17 '14 at 21:01
1

I've been trying against a Geoserver / Windows server 2003 installation, and it works. Doesn't work when it's a Geoserver / Centos Installation. With Udig WFS-T updates against a Geoserver / Centos are commited.

Please also refer to: QGIS WFS Error - Could not commit changes to layer

4
  • Removing the xsi tag from the request worked. Now the only thing is how do you modify the request within QGIS. Or should i look into moving to a linux based server – lolcat Nov 18 '14 at 5:10
  • I'm doing research. Will post here whatever work around turns up. – Eric KLeinjan Nov 18 '14 at 21:24
  • After a bit more digging, I found that you don't have to remove the entire xsi:schemaLocation'' parameter. My POST request is putting the geoserver workspace in front of the url. i.e. instead of xsi:schemaLocation='http://......" it has xsi:schemaLocation='workspace http://.....' removing the workspace causes a successful update - posted on qgis github site to try and get a resolution – lolcat Dec 15 '14 at 22:53
  • Same problem here, how could i remove xsi:schemaLocation from the POST to make it work? Geoserver on Windows Server 2012 + QGIS 2.6.1 on Windows7 – Egidi Dec 26 '14 at 10:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.