Validating your WFS and WMS services
After a web service has been deployed, testing must be done to ensure that the service will work in the system, that is, be interoperable and available to end users. This group post will discuss using WFS GetFeature requests and WMS GetCapabilities requests for service validation. All OGC (Open Geospatial Consortium) services offer these requests which return an XML representation of the data. Some of the following information is taken from GeoSciML Portrayal Cookbook (available in full here http://usgin.org/sites/usgin.org/files/GeoSciML-PortrayalCookbook.pdf).
GetCapabilities Requests
If your service is deployed using ArcMap products, the request starts from your service rest page. Scroll to the "WFS" and "WMS" links on the service rest page. The URL given from these links is the Get Capabilities request, which consists of a service endpoint part, and the OGC request part:
http://services.azgs.az.gov/ArcGIS/services/aasggeothermal/ALBoreholeTemperatures/MapServer/WFSServer?request=GetCapabilities&service=WFS
The service endpoint begins with a host name that identifies the server, followed by the local path name used by the host and the service requested.
WFS Validation
Web Feature Service validation begins with a GetFeature request. First, retreive the GetCapabilites as above. Edit the URL to replace "Capabilites" with "Feature". Add to the end of the URL "&TypeName=<exact layer name>". Using the GetCapabilites example above, the GetFeature request would look like the following:
http://services.azgs.az.gov/ArcGIS/services/aasggeothermal/ALBoreholeTemperatures/MapServer/WFSServer?request=GetFeature&service=WFS&TypeName=BoreholeTemperature
Using this GetFeature request for validation of a WFS service against an XML schema (http://schemas.usgin.org/schemas/) requires additonal applications. A free and open source option is XMLExplorer (http://xmlexplorer.codeplex.com/) paired with Notepad++; these applications will allow a user to edit and validate XML for the service. A licensed option is XMLSpy, which allows for XML editing and validating in one.
WMS Validation
For Web Map Service validation, the service endpoint portion is the only bit of the GetCapabilites request that is needed. From the above example, this would be everthing left of the ? :
http://services.azgs.az.gov/ArcGIS/services/aasggeothermal/ALBoreholeTemperatures/MapServer/WMSServer
If using ArcMap products, open ArcCatalog. In the Catalog Tree, expand GIS Servers. Click "Add WMS Server". Copy and paste the service endpoint into the URL box and click "Get Layers". This should add you service's map layers into the Catalog Tree. Drag that layer into ArcMap. If ArcMap can recognize the layer and draw the features, the service has been validated.
A free and open source application option to validate your WMS is uDig (http://udig.refractions.net/). Here, firest create a new map. On the upper menu bar, click "Layer" and "Add". Choose Web Map Server. Copy and paste the service endpoint into the URL box. In the Resource Selection window, select the layer from your map service and click "Finish".
- Login to post comments