source: TI02-CSML/trunk/services/3rdParty/OWSLib-0.2.0/tests/MapServerWFSFeature.txt @ 2194

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI02-CSML/trunk/services/3rdParty/OWSLib-0.2.0/tests/MapServerWFSFeature.txt@2194
Revision 2194, 650 bytes checked in by lawrence, 13 years ago (diff)

Adding various specs and 3rd party code of interest for the CSML
services development.

Line 
1
2Imports
3
4    >>> from owslib.wfs import WebFeatureService
5   
6Test the getfeature method
7
8    >>> wfs = WebFeatureService('http://www.bsc-eoc.org/cgi-bin/bsc_ows.asp?', version='1.0.0')
9    >>> response = wfs.getfeature(typename=['IBA'], maxfeatures=5)
10    >>> response.read().find('<wfs:FeatureCollection') > 0
11    True
12
13Handle service exception
14
15    >>> response = wfs.getfeature(typename=['totally bogus'], maxfeatures=5)
16    Traceback (most recent call last):
17    ...
18    ServiceException: msWFSGetFeature(): WFS server error. TYPENAME 'totally bogus' doesn't exist in this server.  Please check the capabilities and reformulate your request.
19
Note: See TracBrowser for help on using the repository browser.