[FrontPage] [TitleIndex] [WordIndex

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. Preparations

1.1. deegree 2.2 stable (December 2008)

  1. Install the deegree 2.2 WFS demo.

  2. Download a 2.3-rc3 deegree2.jar or a nightly build deegree2.jar and put it into folder deegree-wfs/WEB-INF/lib (overwriting the existing deegree2.jar file).

  3. 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.

  4. 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)

  1. Download and install the deegree 2.3-rc3 WFS demo

  2. Make sure to have the necessary XSL-script in your deegree-wfs webapp folder (WEB-INF/conf/wfs/xslt/outwfs1_0_0.xsl)

  3. 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.

2. FeatureTypeList

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:Title>Spring in Utah</wfs:Title>
      <wfs:Abstract>All Spring in Utah</wfs:Abstract>
        <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>
        <ows:LowerCorner>-180 -90</ows:LowerCorner>
        <ows:UpperCorner>180 90</ows:UpperCorner>

The crucial part is the OutputFormat:

        <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>

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.


2018-04-20 12:04