Make the deegree 2 demo WFS 1.0.0 compliant
The deegree 2 demo WFS only supports the 1.1.0 WFS standard out-of-the-box. However, many clients (e.g. uDig) only support WFS 1.0.0. It is possible to register XSL-scripts in the WFS configuration to make the deegree 2 WFS work with clients that require the older standard.
The main difference between WFS 1.0.0 and WFS 1.1.0 is (in respect to causing problems for WFS clients) that the older produces GML2 as output format, while the newer provides GML3 output. So basically, in order to use a WFS 1.1.0 with WFS Clients that only understand GML2 output from WFS 1.0.0, you have to additionaly register the GML 2 output format to your WFS. You do this by changing the wfs_configuration.xml. The GML2 format can be plugged into the deegree 2 WFS using an XSL-script.
1.1. deegree 2.2 stable (December 2008)
Install the deegree 2.2 WFS demo.
Download the XSL script outwfs1_0_0.xsl for the GML2 format and put it into the deegree-wfs/WEB-INF/conf/wfs/xslt folder.
Modify the deegree-wfs/WEB-INF/conf/wfs/wfs_configuration.xml file, i.e. add a wfs:FeatureType element for each feature type ("app:Railroads", "app:Springs", ...) to the wfs:FeatureTypeList element.
1.2. deegree 2.3-rc3 (February 2010)
Download and install the deegree 2.3-rc3 WFS demo
Make sure to have the necessary XSL-script in your deegree-wfs webapp folder (WEB-INF/conf/wfs/xslt/outwfs1_0_0.xsl)
Modify the deegree-wfs/WEB-INF/conf/wfs/wfs_configuration.xml file. Each feature type that should be made available in GML2, must be listed in the wfs:FeatureTypeList section.
The FeatureTypeList is a section within the wfs_configuration.xml inside your webapp at WEB-INF/conf/wfs/.
The following snippet is for the "app:Railroads" feature type:
... <wfs:FeatureTypeList xmlns:app="http://www.deegree.org/app"> <wfs:FeatureType> <wfs:Name>app:Springs</wfs:Name> <wfs:Title>Spring in Utah</wfs:Title> <wfs:Abstract>All Spring in Utah</wfs:Abstract> <ows:Keywords> <ows:Keyword>Springs</ows:Keyword> </ows:Keywords> <wfs:DefaultSRS>EPSG:26912</wfs:DefaultSRS> <wfs:OtherSRS>EPSG:4326</wfs:OtherSRS> <wfs:OutputFormats> <wfs:Format deegree:outFilter="xslt/outwfs1_0_0.xsl" deegree:inFilter="" deegree:schemaLocation="./schemas/SGID024_Springs_shp.xsd">GML2</wfs:Format> <wfs:Format>text/xml; subtype=gml/3.1.1</wfs:Format> </wfs:OutputFormats> <ows:WGS84BoundingBox> <ows:LowerCorner>-180 -90</ows:LowerCorner> <ows:UpperCorner>180 90</ows:UpperCorner> </ows:WGS84BoundingBox> </wfs:FeatureType> ... </wfs:FeatureTypeList> ...
The crucial part is the OutputFormat:
... <wfs:OutputFormats> <wfs:Format deegree:outFilter="xslt/outwfs1_0_0.xsl" deegree:inFilter="" deegree:schemaLocation="./schemas/SGID024_Springs_shp.xsd">GML2</wfs:Format> <wfs:Format>text/xml; subtype=gml/3.1.1</wfs:Format> </wfs:OutputFormats> ...
This specifies that the output for format "GML2" should be postprocessed using the XSL script loaded from "xslt/outwfs1_0_0.xsl" (you have to place the script in you webapp accordingly). The schemaLocation attribute specifies the file that should be returned for DescribeFeatureType requests that ask for GML2. Input filtering is not needed for a non-transactional WFS.
That's it. Restart tomcat and the demo-WFS should serve 1.0.0 requests and work with uDig now. We're looking forward to enable this feature in deegree 2.4 releases by default.