GetFeature Response

Feedback


Response introduction

The format of the response to a GetFeature request is controlled by the outputFormat attribute. The default value for the outputFormat attribute shall be GML2. This will indicate that a WFS must generate a GML document of the result set that conforms to the OpenGIS Geography Markup Language Implementation Specification, version 2.1.1, and more specifically, the output must validate againt the GML application schema generated by the DescribeFeatureType operation.

Any GML document generated by a WFS implementation, in response to a query where the outputFormat is GML2, must reference an appropriate GML application schema document so that the output can be validated. This can be accomplished using the schemaLocation attribute. This attribute provides hints as to the physical location of one or more schema documents which may be used for local validation and schema-validity assessment. The schemaLocation attribute value contains pairs of values. The first member of each pair is the namespace for which the second member is the hint describing where to find to an appropriate schema document. The physical location of the schema documents is specified using a URI.

The following XML fragment shows the use of the schemaLocation attribute on the root element indicating the location of the an XML Schema document that can be used for validation:

<?xmlversion="1.0"?>

<wfs:FeatureCollection

    xmlns="http://www.opengis.net/myns"

    xmlns:myns="http://www.opengis.net/myns"

    xmlns:gml="http://www.opengis.net/gml"

    xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance

    xsi:schemaLocation="http://www.opengis.net/myns

        http://www.someserver.com/wfs.cgi?

        request=DescribeFeatureType&typename=TREESA_1M,ROADL_1M">

......

In this instance, the schema document corresponding to the myns namespace is dynamically generated by making a DescribeFeatureType request back to the server that generated the output, requesting the schema. This DescribeFeatureType operation [sec. 8] requests the schema of the feature types TREESA_1M and ROADL_1M, both in the myns namespace.

It is up to each WFS implementation to arrange that the GML output makes the appropriate schemaLocation reference(s) such that the output can be validated.

For the <GetFeatureWithLock> request, a WFS must generate a result that includes the lock identifier. The lock identifier is encoded using the lockId attribute that is defined on the <wfs:FeatureCollection> element. The following XML fragment illustrates how to include the lockId attribute in the response to the operation:

<wfs:FeatureCollectionlockId="00A01"…>

</wfs:FeatureCollection>

Response example

The response of the Request example is as follows: