Web Feature service
Creating a request to access a layer through WFS is not so different from WMS. However, the output is very different; with WFS, you get a vector representation of the data in a textual or binary format. The following code snippet is a request for the Packt:places layer:
http://localhost:8080/geoserver/Packt/ows?
service=WFS&
version=1.0.0&
request=GetFeature&
typeName=Packt:places&
maxFeatures=50&
outputFormat=text/xml; subtype=gml/2.1.2 As we did previously with WMS, we are now going to discuss each parameter:
Parameter | Description |
| Explains to GeoServer what kind of request you are sending. The value is WFS as we want to retrieve a vector representation of the data. |
| Indicates the specific version of WFS you want to use. |
| Defines what operation you are requesting, among those supported by the service, GetFeature is the basic request to obtain data. |
| Specifies what layer should be used to... |