On Thu, Mar 15, 2012 at 10:29 AM, xavier lhomme <[email protected]> wrote: > Hello > > I made a small sample in C# that connect to a WFS source and obtain the > feature. > I want to check which request has been send to the server. > How can I do that ? I want to use fiddler but I need to send all request to > a proxy. How could I pass a proxy to the OgrWFSDatasource ? >
you just need to activate the GDAL debug by setting to ON the CPL_DEBUG environment variable. after that you will be able to see all the request done to the WFS server. For example, using the command line, with ogrinfo: $ ogrinfo -ro WFS:"http://geohub.jrc.ec.europa.eu/effis/ows" WFS: http://geohub.jrc.ec.europa.eu/effis/ows?SERVICE=WFS&REQUEST=GetCapabilities&ACCEPTVERSIONS=1.1.0,1.0.0 HTTP: Fetch(http://geohub.jrc.ec.europa.eu/effis/ows?SERVICE=WFS&REQUEST=GetCapabilities&ACCEPTVERSIONS=1.1.0,1.0.0) WFS: GetFeature operation supports hits WFS: Transaction support ! OGR: OGROpen(WFS:http://geohub.jrc.ec.europa.eu/effis/ows/0xa56450) succeeded as WFS. INFO: Open of `WFS:http://geohub.jrc.ec.europa.eu/effis/ows' using driver `WFS' successful. OGR: GetLayerCount() = 7 HTTP: Fetch(http://geohub.jrc.ec.europa.eu/effis/ows?SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=EFFIS:FireNews,EFFIS:Fires30Days,EFFIS:Fires7Days,EFFIS:FiresAll,EFFIS:Hotspots1Day,EFFIS:Hotspots7Days,EFFIS:HotspotsAll) WFS: http://geohub.jrc.ec.europa.eu/effis/ows?SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=EFFIS:FireNews [...] or using the GDAL API, for example in Python: >>> from osgeo import ogr >>> driver = ogr.GetDriverByName('WFS') >>> wfs = driver.Open("WFS:http://geohub.jrc.ec.europa.eu/effis/ows") WFS: http://geohub.jrc.ec.europa.eu/effis/ows?SERVICE=WFS&REQUEST=GetCapabilities&ACCEPTVERSIONS=1.1.0,1.0.0 HTTP: Fetch(http://geohub.jrc.ec.europa.eu/effis/ows?SERVICE=WFS&REQUEST=GetCapabilities&ACCEPTVERSIONS=1.1.0,1.0.0) WFS: GetFeature operation supports hits WFS: Transaction support ! >>> layer = wfs.GetLayerByName('FiresAll') >>> feture = layer.GetNextFeature() HTTP: Fetch(http://geohub.jrc.ec.europa.eu/effis/ows?SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=EFFIS:FiresAll,EFFIS:FireNews,EFFIS:Fires30Days,EFFIS:Fires7Days,EFFIS:Hotspots1Day,EFFIS:Hotspots7Days,EFFIS:HotspotsAll) WFS: http://geohub.jrc.ec.europa.eu/effis/ows?SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=EFFIS:FiresAll HTTP: Fetch(http://geohub.jrc.ec.europa.eu/effis/ows?SERVICE=WFS&VERSION=1.1.0&REQUEST=DescribeFeatureType&TYPENAME=EFFIS:FiresAll) WFS: http://geohub.jrc.ec.europa.eu/effis/ows?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=EFFIS:FiresAll HTTP: Fetch(http://geohub.jrc.ec.europa.eu/effis/ows?SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=EFFIS:FiresAll) GML: Using Expat reader OGR: OGROpen(/vsimem/tempwfs_0x16ad2e0/file.gml/0x14aedf0) succeeded as GML. GML: ResetReading() GML: ResetReading() best regards P -- Paolo Corti Geospatial software developer web: http://www.paolocorti.net twitter: @capooti skype: capooti _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
