wfs-service-settings.rst 1.9 KB

1234567891011121314151617181920212223242526272829303132
  1. .. _app-schema.wfs-service-settings:
  2. WFS Service Settings
  3. ====================
  4. There are two GeoServer WFS service settings that are strongly recommended for interoperable complex feature services. These can be enabled through the :menuselection:`Services --> WFS` page on the GeoServer web interface or by manually editing the :file:`wfs.xml` file in the data directory,
  5. Canonical schema location
  6. -------------------------
  7. The default GeoServer behaviour is to encode WFS responses that include a ``schemaLocation`` for the WFS schema that is located on the GeoServer instance. A client will not know without retrieving the schema whether it is identical to the official schema hosted at ``schemas.opengis.net``. The solution is to encode the ``schemaLocation`` for the WFS schema as the canonical location at ``schemas.opengis.net``.
  8. To enable this option, choose *one* of these:
  9. #. Either: On the :menuselection:`Service --> WFS` page under *Conformance* check *Encode canonical WFS schema location*.
  10. #. Or: Insert the following line before the closing tag in :file:`wfs.xml`::
  11. <canonicalSchemaLocation>true</canonicalSchemaLocation>
  12. Encode using featureMember
  13. --------------------------
  14. By default GeoServer will encode WFS 1.1 responses with multiple features in a single ``gml:featureMembers`` element. This will cause invalid output if a response includes a feature at the top level that has already been encoded as a nested property of an earlier feature, because there is no single element that can be used to encode this feature by reference. The solution is to encode responses using ``gml:featureMember``.
  15. To enable this option, choose *one* of these:
  16. #. Either: On the :menuselection:`Service --> WFS` page under *Encode response with* select *Multiple "featureMember" elements*.
  17. #. Or: Insert the following line before the closing tag in :file:`wfs.xml`::
  18. <encodeFeatureMember>true</encodeFeatureMember>