This article contains example files, processes, and instructions. It is intended as a reference and complement to the WFSRI 3.5 User Guide.

Table of Contents

Specifying the Feature Table Definition XML


The sample Feature Table Definition schemas referenced in the following examples can all be found in the $WFSRI_INSTALL/data/xml/mapping directory.

  1. Specify the root element, a Feature Schema. For example, from lightningFlash.xml:
     

    <nnew:FeatureSchema xmlns:nnew=http://www.faa.gov/wfs/admin/1.1
      xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
      xmlns:xlink=http://www.w3.org/1999/xlink
      xsi:schemaLocation="http://www.faa.gov/wfs/admin/1.1
        ../../../../../../wfsri-bindings/schemas/gov/faa/wfs/admin/
        1.1.0/featureTableDefinition.xsd">

  2. For each Feature Table to be created in the database, specify the table’s metadata. All examples are taken from lightningFlash.xml unless otherwise indicated.
     

    <nnew:FeatureTable>

    1. Specify whether the table definition depends on a Base Table Definition XML. For example, from runwayAssignment.xml:
       

      <nnew:FeatureTable xlink:href="/xml/parsing/runwayBase.xml">

    2. Specify the schema name. This should be identical to the Producer’s username. The string value is limited to uppercased alpha and numeric characters, and the underscore (_).
       

      <nnew:schemaName>MITP</nnew:schemaName>

    3. Specify the table name. This is the name to use in the Oracle database. This element is optional. If it were omitted, the name defaults to the value of the XSD name, in uppercased letters. If it were included, the string value is limited to uppercased alpha and numeric characters and the underscore (_).
       

      <nnew:tableName>LIGHTNINGFLASH</nnew:tableName>

       
      Given this example, because Feature Type in the XSD is named “lightningFlash,” <nnew:tableName> could be omitted, and the table name would remain “LIGHTNINGFLASH.”
       
    4. Specify the XSD name. This is the name of the Feature Type element as it appears in the Feature Type XSD and as it will appear in Feature Type XML instances. The string value may not be empty, and may not exceed 27 characters.
       

      <nnew:xsdName>LightningFlash</nnew:xsdName>

    5. Specify the XSD namespace URI(s). These are the namespace prefix and URI pairs as they appear in the Feature Type XSD and as they will appear in Feature Type XML instances. The string value may not be empty.
       

      <nnew:xsdNamespaceURI>nnew='http://www.faa.gov/wfs/admin/1.1'
        gml='http://www.opengis.net/gml'</nnew:xsdNamespaceURI>

       
      Ensure that each namespace prefix used in the XSD Names of the Feature Table Columns is defined in this value. Delimit the pairs using a single space.
       
    6. Specify the URN that identifies the spatial reference system in use.
       

      <nnew:srsName>urn:ogc:def:crs:EPSG::4326</nnew:srsName>

    7. Specify the dimensionality of the spatial reference system identified in the <nnew:srsName> element.
       

      <nnew:srsDimension>2</nnew:srsDimension>

    8. Specify the values to be used by the Oracle database when creating spatial indexes for the Feature Table. Note that this element is optional; if omitted, default values will be used.
       

      <nnew:SrsIndexes>
        <nnew:IndexXDimension>
          <nnew:min>-180</nnew:min>
          <nnew:max>180</nnew:max>
          <nnew:tolerance>0.05</nnew:tolerance>
        </nnew:IndexXDimension>
        <nnew:IndexYDimension>
          <nnew:min>-90</nnew:min>
          <nnew:max>90</nnew:max>
          <nnew:tolerance>0.05</nnew:tolerance>
        </nnew:IndexYDimension>
        <nnew:IndexZDimension>
          <nnew:min>0</nnew:min>
          <nnew:max>300</nnew:max>
          <nnew:tolerance>0.05</nnew:tolerance>
        </nnew:IndexZDimension>
      </nnew:SrsIndexes>

       
      The X and Y dimensions must be specified for a 2D spatial reference system. 3D spatial reference systems require the additional X dimension. For each dimension, a lower and upper bound must be specified, along with a tolerance value.
       
      • Values in the X dimension must be between -180 and 180, inclusive.
      • Values in the Y dimension must be between -90 and 90, inclusive.
      • Tolerance values must be greater than or qual to 0.05 (5 centimeters).
         
    9. Specify the values to be used by the Oracle database when creating partitions for the Feature Table. The example below stores lightningFlash data in partitions for fifteen days, with timePosition ranges two hours long (i.e., 00:00 - 02:00, 02:01 - 04:00, etc.):
       

      <nnew:PartitionPolicy>
        <nnew:key>TIMEPOSITION</nnew:key>
        <nnew:duration>PT2H</nnew:duration>
        <nnew:retention>P15D</nnew:retention>
      </nnew:PartitionPolicy>

      • Within the <nnew:key> element, specify the Feature Table column you wish to use to define the partitions. This column needs to be of the dateTime datatype.
      • Within the <nnew:duration> element, specify the duration of a partition in hours. The duration is limited to a maximum of 24 hours – one full day.
      • Within the <nnew:retention> element, specify the retention time of a partition, in days. For example, to specify one full year, input a retention value of P356D, for 356 days.
         
  3. For each element or attribute in the FeatureType type to be extracted as a database table column, specify the metadata for the Feature Table Column. All examples are taken from lightningFlash.xml.
     

    <nnew:FeatureTableColumn>

    1. Specify the column name. This is the name to use in the database. The string value is limited to uppercased alpha and numeric characters and the underscore (_).
       

      <nnew:columnName>STRENGTH</nnew:columnName>

    2. Specify the column datatype. This is used to indicate whather this FeatureType type element or attribute is a spatial entity (“Spatial”). The default value is that it is not (“Other”). As such, its value may be an empty string. For example, for the “STRENGTH” column:
       

      <nnew:columnDatatype/>

       
      For the “GEOMETRY” column:
       

      <nnew:columnDatatype>Spatial</nnew:columnDatatype>

    3. Specify the XSD name. This an XPath path expression, relative to the Feature Type tag (in this example, <nnew:LightningFlash>), to the FeatureType type element or attribute as it appears in the Feature Type XSD and as it will appear in Feature Type XML instances. The string value may not be empty.
       

      <nnew:xsdName>nawx:strength</nnew:xsdName>
      <nnew:xsdName>nawx:geometry</nnew:xsdName>
      <nnew:xsdName>naws:strength@uom</nnew:xsdName>

    4. Specify whether this is an XSD attribute (“true”). The default value is that it is not (“false”). As such, its value may be an empty string. For example, for the “STRENGTH” column:
       

      <nnew:xsdAttribute/>

       
      For the “UOM” column:
       

      <nnew:xsdAttribute>true</nnew:xsdAttribute>

    5. Specify the XSD datatype. This is the XML schema datatype of the FeatureType type element or attribute as it appears in the Feature Type XSD. The string value may not be empty.
       

      <nnew:xsdDatatype>string</nnew:xsdDatatype>

  4. If the Feature Table Definition depends on a Base Table Definiton XML, specify that XML.
     
    1. Specify the root element, a Base Table. For example, from src/test/resources/xml/parsing/runwayBase.xml in your WFSRI-Template folder:
       

      <nnew:BaseTable xmlns:nnew=http://www.faa.gov/wfs/admin/1.1
        xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
        xsi:schemaLocation="http://www.faa.gov/wfs/admin/1.1
          ../../../../../../wfsri-bindings/schemas/gov/faa/wfs/admin/
          1.1.0/baseTableDefinition.xsd">

    2. Specify whether this table definition depends on another Base Table Definition XML. For example, from src/test/resources/xml/parsing/runwayBaseTest.xml in your WFSRI-Template folder:
       

      <nnew:BaseTable xmlns:nnew=http://www.faa.gov/wfs/admin/1.1
        xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
        xmlns:xlink="http://www.w3.org/1999/xlink"
        xsi:schemaLocation="http://www.faa.gov/wfs/admin/1.1
          ../../../../../../wfsri-bindings/schemas/gov/faa/wfs/admin/
          1.1.0/baseTableDefinition.xsd"
        xlink:href="/xml/parsing/test.xml">

    3. For each element or attribute in the Base type to be extracted as a database table column, specify the metadata for the Feature Table Column. See Step 3, above.

Example Feature Type Description XML File


When programmatically registering a new FeatureType, you must pass in a series of properties further defining the FeatureType. One of these properties is a pointer to a Capabilities file, a small file containing the response that the Web Feature Server should make when it receives a GetCapabilities query. A GetCapabilities response file should something like this:

<?xml version="1.0" ?>
<wfs:FeatureType xmlns:wfs="http://www.opengis.net/wfs">
    <Name xmlns:tfdm="http://www.faa.gov/tfdm/1.0">
      tfdm:TfdmFlightStatusFeature</Name>
    <Title>TFDMFLIGHTSTATUSFEATURE</Title>
    <SRS>SDO:4326</SRS>
</wfs:FeatureType>

Example Feature Type Registration Properties File


When programmatically registering a new FeatureType, you must pass in a series of properties further defining the FeatureType. Together, these properties can be encased in a Properties file, like the one below:

# Table/Feature Type Registration File
 
featuretypeName = RunwayAssignment
featuretypeURL = http://www.faa.gov/tfdm/1.0
featuretypeDescFile = $PATH/tfdmRunwayAssignment1.xml
describeFeatureTypeFile = $PATH/tfdmRunwayAssignment.xsd
srsNS = urn:ogc:def:crs:EPSG::4235
schemaName = GABRIEL
tableName = RUNWAYASSIGNMENT
pKeyCol = ID
pSpatialCol = LOCATION
sml31 = true
 
schemaLocation = $PATH/tfdmRunwayAssignment.xsd
featureMemberNS = http://www.opengis.net/gmls.neB

Example GetCapabilities Response File #1


An example of a response to a GetCapabilities request in which all sections were asked for:

  <wfs:WFS_Capabilities xsi:schemaLocation="http://www.opengis.net/wfs/2.0
   ../../../../../../ogc-bindings/schemas/net/opengis/wfs/2.0.0/wfs.xsd"
                        version="2.0.0" updateSequence="0"
                        xmlns:ows="http://www.opengis.net/ows/1.1"
                        xmlns:ogc="http://www.opengis.net/ogc"
                        xmlns:wfs="http://www.opengis.net/wfs/2.0"
                        xmlns:gml="http://www.opengis.net/gml/3.2"
                        xmlns:xlink="http://www.w3.org/1999/xlink"
                        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                        xmlns:fes="http://www.opengis.net/fes/2.0">

    <ows:ServiceIdentification>
      <ows:Title>MIT/LL WFS</ows:Title>
      <ows:Abstract>Web Feature Service maintained by MIT/LL, serving NNEW data providers;
        contact claypool@ll.mit.edu</ows:Abstract>
      <ows:Keywords>
        <ows:Keyword>MIT/LL</ows:Keyword>
        <ows:Keyword>NNEW</ows:Keyword>
        <ows:Keyword>MIT Lincoln Laboratory</ows:Keyword>
        <ows:Type>String</ows:Type>
      </ows:Keywords>
      <ows:ServiceType>WFS</ows:ServiceType>
      <ows:ServiceTypeVersion>2.0.0</ows:ServiceTypeVersion>
      <ows:Fees>None</ows:Fees>
      <ows:AccessConstraints>None</ows:AccessConstraints>
    </ows:ServiceIdentification>

    <ows:ServiceProvider>
      <ows:ProviderName>MIT Lincoln Laboratory</ows:ProviderName>
      <ows:ProviderSite xlink:href="http://www.ll.mit.edu/"/>
      <ows:ServiceContact>
        <ows:IndividualName>Kajal Claypool</ows:IndividualName>
        <ows:PositionName>Technical Staff</ows:PositionName>
        <ows:ContactInfo>
          <ows:Phone>
            <ows:Voice>781.981.5404</ows:Voice>
            <ows:Facsimile>781.981.WOOD</ows:Facsimile>
          </ows:Phone>
          <ows:Address>
            <ows:DeliveryPoint>244 Wood Street</ows:DeliveryPoint>
            <ows:City>Lexington</ows:City>
            <ows:AdministrativeArea>Group 43</ows:AdministrativeArea>
            <ows:PostalCode>02420</ows:PostalCode>
            <ows:Country>USA</ows:Country>
            <ows:ElectronicMailAddress>claypool@ll.mit.edu</ows:ElectronicMailAddress>
          </ows:Address>
          <ows:OnlineResource xlink:href="http://wxforge.wx.ll.mit.edu:8080/jira"/>
          <ows:HoursOfService>24x7</ows:HoursOfService>
          <ows:ContactInstructions>Create a JIRA issue (Web Feature Service project) with normal requsts;
            E-mail or phone Kajal for emergency requests.</ows:ContactInstructions>
        </ows:ContactInfo>
        <ows:Role>PointOfContact</ows:Role>
      </ows:ServiceContact>
    </ows:ServiceProvider>

    <ows:OperationsMetadata>
      <ows:Operation name="GetCapabilities">
        <ows:DCP>
          <ows:HTTP>
            <ows:Get xlink:href="http://ll.mit.edu/wfs"/>
          </ows:HTTP>
        </ows:DCP>
        <ows:Parameter name="AcceptVersions">
          <ows:AllowedValues>
            <ows:Value>2.0.0</ows:Value>
          </ows:AllowedValues>
        </ows:Parameter>
        <ows:Parameter name="Sections">
          <ows:AllowedValues>
            <ows:Value>ServiceIdentification</ows:Value>
            <ows:Value>ServiceProvider</ows:Value>
            <ows:Value>OperationsMetadata</ows:Value>
            <ows:Value>FeatureTypeList</ows:Value>
            <ows:Value>Filter_Capabilities</ows:Value>
          </ows:AllowedValues>
        </ows:Parameter>
      </ows:Operation>
      <ows:Operation name="DescribeFeatureType">
        <ows:DCP>
          <ows:HTTP>
            <ows:Get xlink:href="http://ll.mit.edu/wfs/wfs.cgi?"/>
            <ows:Post xlink:href="http://ll.mit.edu/wfs/wfs.cgi"/>
          </ows:HTTP>
        </ows:DCP>
      </ows:Operation>
      <ows:Operation name="GetFeature">
        <ows:DCP>
          <ows:HTTP>
            <ows:Get xlink:href="http://ll.mit.edu/wfs/wfs.cgi?"/>
            <ows:Post xlink:href="http://ll.mit.edu/wfs/wfs.cgi"/>
          </ows:HTTP>
        </ows:DCP>
        <ows:Parameter name="resultType">
          <ows:AllowedValues>
            <ows:Value>results</ows:Value>
            <ows:Value>hits</ows:Value>
          </ows:AllowedValues>
        </ows:Parameter>
      </ows:Operation>
      <ows:Operation name="Transaction">
        <ows:DCP>
          <ows:HTTP>
            <ows:Post xlink:href="http://ll.mit.edu/wfs"/>
          </ows:HTTP>
        </ows:DCP>
      </ows:Operation>
      <ows:Operation name="Notify">
        <ows:DCP>
          <ows:HTTP>
            <ows:Get xlink:href="http://ll.mit.edu/wfs/wfs.cgi?"/>
            <ows:Post xlink:href="http://ll.mit.edu/wfs/wfs.cgi"/>
          </ows:HTTP>
        </ows:DCP>
      </ows:Operation>
      <ows:Operation name="PauseSubscription">
        <ows:DCP>
          <ows:HTTP>
            <ows:Get xlink:href="http://ll.mit.edu/wfs/wfs.cgi?"/>
            <ows:Post xlink:href="http://ll.mit.edu/wfs/wfs.cgi"/>
          </ows:HTTP>
        </ows:DCP>
        <ows:Parameter name="resultType">
          <ows:AllowedValues>
            <ows:Value>results</ows:Value>
            <ows:Value>hits</ows:Value>
          </ows:AllowedValues>
        </ows:Parameter>
      </ows:Operation>
      <ows:Operation name="Renew">
        <ows:DCP>
          <ows:HTTP>
            <ows:Post xlink:href="http://ll.mit.edu/wfs"/>
          </ows:HTTP>
        </ows:DCP>
      </ows:Operation>
      <ows:Operation name="ResumeSubscription">
        <ows:DCP>
          <ows:HTTP>
            <ows:Get xlink:href="http://ll.mit.edu/wfs/wfs.cgi?"/>
            <ows:Post xlink:href="http://ll.mit.edu/wfs/wfs.cgi"/>
          </ows:HTTP>
        </ows:DCP>
      </ows:Operation>
      <ows:Operation name="Subscribe">
        <ows:DCP>
          <ows:HTTP>
            <ows:Get xlink:href="http://ll.mit.edu/wfs/wfs.cgi?"/>
            <ows:Post xlink:href="http://ll.mit.edu/wfs/wfs.cgi"/>
          </ows:HTTP>
        </ows:DCP>
        <ows:Parameter name="resultType">
          <ows:AllowedValues>
            <ows:Value>results</ows:Value>
            <ows:Value>hits</ows:Value>
          </ows:AllowedValues>
        </ows:Parameter>
      </ows:Operation>
      <ows:Operation name="Unsubscribe">
        <ows:DCP>
          <ows:HTTP>
            <ows:Post xlink:href="http://ll.mit.edu/wfs"/>
          </ows:HTTP>
        </ows:DCP>
      </ows:Operation>
      <ows:Parameter name="version">
        <ows:AllowedValues>
          <ows:Value>2.0.0</ows:Value>
        </ows:AllowedValues>
      </ows:Parameter>
      <ows:Constraint name="DefaultMaxFeatures">
         <ows:NoValues/>
         <ows:DefaultValue>10000</ows:DefaultValue>
      </ows:Constraint>
    </ows:OperationsMetadata>

    <wfs:FeatureTypeList>
      <wfs:FeatureType xmlns:wfs="http://www.opengis.net/wfs">
        <Name xmlns:nawx="http://www.faa.gov/nawx/1.1">nawx:LightningFlash</Name>
        <Title>LightningFlash</Title>
        <SRS>urn:ogc:def:crs:EPSG::4326</SRS>
      </wfs:FeatureType>
    </wfs:FeatureTypeList>

    <fes:Filter_Capabilities>
      <fes:Id_Capabilities>
        <fes:ResourceIdentifier name="fes:ResourceId">
          <ows:Metadata/>
        </fes:ResourceIdentifier>
      </fes:Id_Capabilities>
      <fes:Scalar_Capabilities>
        <fes:LogicalOperators/>
        <fes:ComparisonOperators>
          <fes:ComparisonOperator name="PropertyIsEqualTo"/>
          <fes:ComparisonOperator name="PropertyIsNotEqualTo"/>
          <fes:ComparisonOperator name="PropertyIsLessThan"/>
          <fes:ComparisonOperator name="PropertyIsGreaterThan"/>
          <fes:ComparisonOperator name="PropertyIsLessThanOrEqualTo"/>
          <fes:ComparisonOperator name="PropertyIsGreaterThanOrEqualTo"/>
        </fes:ComparisonOperators>
      </fes:Scalar_Capabilities>
      <fes:Spatial_Capabilities>
        <fes:GeometryOperands>
          <fes:GeometryOperand name="gml:AbstractGeometricPrimitive"/>
        </fes:GeometryOperands>
        <fes:SpatialOperators>
          <fes:SpatialOperator name="BBOX"/>
          <fes:SpatialOperator name="Equals"/>
          <fes:SpatialOperator name="Disjoint"/>
          <fes:SpatialOperator name="Intersects"/>
          <fes:SpatialOperator name="Touches"/>
          <fes:SpatialOperator name="Crosses"/>
          <fes:SpatialOperator name="Within"/>
          <fes:SpatialOperator name="Contains"/>
          <fes:SpatialOperator name="Overlaps"/>
        </fes:SpatialOperators>
      </fes:Spatial_Capabilities>
    </fes:Filter_Capabilities>

  </wfs:WFS_Capabilities>

Example GetCapabilities Response File #2


An example of a response to a GetCapabilities request in which only the FeatureTypeList section was asked for:

  <wfs:WFS_Capabilities xsi:schemaLocation="http://www.opengis.net/wfs/2.0
   ../../../../../../ogc-bindings/schemas/net/opengis/wfs/2.0.0/wfs.xsd"
                        version="2.0.0" updateSequence="0"
                        xmlns:ows="http://www.opengis.net/ows/1.1"
                        xmlns:ogc="http://www.opengis.net/ogc"
                        xmlns:wfs="http://www.opengis.net/wfs/2.0"
                        xmlns:gml="http://www.opengis.net/gml/3.2"
                        xmlns:xlink="http://www.w3.org/1999/xlink"
                        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                        xmlns:fes="http://www.opengis.net/fes/2.0">

    <wfs:FeatureTypeList>
      <wfs:FeatureType xmlns:wfs="http://www.opengis.net/wfs">
        <Name xmlns:nawx="http://www.faa.gov/nawx/1.1">nawx:LightningFlash</Name>
        <Title>LightningFlash</Title>
        <SRS>urn:ogc:def:crs:EPSG::4326</SRS>
      </wfs:FeatureType>
    </wfs:FeatureTypeList>

    <fes:Filter_Capabilities>
      <fes:Id_Capabilities>
        <fes:ResourceIdentifier name="fes:ResourceId">
          <ows:Metadata/>
        </fes:ResourceIdentifier>
      </fes:Id_Capabilities>
      <fes:Scalar_Capabilities>
        <fes:LogicalOperators/>
        <fes:ComparisonOperators>
          <fes:ComparisonOperator name="PropertyIsEqualTo"/>
          <fes:ComparisonOperator name="PropertyIsNotEqualTo"/>
          <fes:ComparisonOperator name="PropertyIsLessThan"/>
          <fes:ComparisonOperator name="PropertyIsGreaterThan"/>
          <fes:ComparisonOperator name="PropertyIsLessThanOrEqualTo"/>
          <fes:ComparisonOperator name="PropertyIsGreaterThanOrEqualTo"/>
        </fes:ComparisonOperators>
      </fes:Scalar_Capabilities>
      <fes:Spatial_Capabilities>
        <fes:GeometryOperands>
          <fes:GeometryOperand name="gml:AbstractGeometricPrimitive"/>
        </fes:GeometryOperands>
        <fes:SpatialOperators>
          <fes:SpatialOperator name="BBOX"/>
          <fes:SpatialOperator name="Equals"/>
          <fes:SpatialOperator name="Disjoint"/>
          <fes:SpatialOperator name="Intersects"/>
          <fes:SpatialOperator name="Touches"/>
          <fes:SpatialOperator name="Crosses"/>
          <fes:SpatialOperator name="Within"/>
          <fes:SpatialOperator name="Contains"/>
          <fes:SpatialOperator name="Overlaps"/>
        </fes:SpatialOperators>
      </fes:Spatial_Capabilities>
    </fes:Filter_Capabilities>

  </wfs:WFS_Capabilities>

Example Transaction-Insert Request XML File


When inserting a new Feature into a Feature Table using the generic SOAP client, you must pass in an XML file, similar to the one below. Additional examples can be found in the $WFSRI_INSTALL/data/xml/transaction-insert directory:

<wfs:Transaction service="WFS" version="2.0.0"
  xmlns:wfs="http://www.opengis.net/wfs/2.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:wx=http://www.eurocontrol.int/wx/1.1
  xmlns:gml="http://www.opengis.net/gml/3.2"
  xmlns:om=http://www.opengis.net/om/1.0/gml32
  xmlns:xlin="http://www.w3.org/1999/xlink"
  xmlns:nawx="http://www.faa.gov/nawx/1.1"
  xsi:schemaLocation="http://www.opengis.net/wfs/2.0
    ../../../../../../../ogc-bindings/schemas/net/opengis/wfs/2.0.0/wfs.xsd
    http://www.faa.gov/nawx/1.1
    ../../../../../../../ogc-bindings/schemas/gov/faa/nawx/1.2.0/wxLightning.xsd">

  <wfs:Insert>
    <nawx:LightningFlash gml:id="id5">
      <wx:obsOrFcstTime>
        <gml:TimeInstant gml:id="id6">
          <gml:timePosition>2008-07-09T03:54:25Z</gml:timePosition>
        </gml:TimeInstant>
      </wx:obsOrFcstTime>
      <nawx:strength uom="kA">-30.0</nawx:strength>
      <nawx:numStrokes>3</nawx:numStrokes>
      <nawx:geometry>
        <gml:Point gml:id="id7" srsName="urn:ogc:def:crs:EPSG::4326" srsDimension="2">
          <gml:pos>38.611629486083984 -81.6015625</gml:pos>
        </gml:Point>
        </nawx:geometry>
    </nawx:LightningFlash>
  </wfs:Insert>
</wfs:Transaction>

Example GetFeature Request XML File


When querying a Feature's data using the generic SOAP client, you must pass in an XML file, similar to the one below. Additional examples can be found in the $WFSRI_INSTALL/data/xml/get-feature directory:

<wfs:GetFeature service="WFS" version="2.0.0"
  xmlns:wfs=http://www.opengis.net/wfs/2.0
  xmlns:nawx="http://www.faa.gov/nawx/1.1"
  xmlns:fes=http://www.opengis.net/fes/2.0
  xmlns:gml="http://www.opengis.net/gml/3.2"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.opengis.net/wfs/2.0
    ../../../../../../../ogc-bindings/schemas/net/opengis/wfs/2.0.0/wfs.xsd">

  <wfs:Query typeNames="nawx:LightningFlash">
    <fes:Filter>
      <fes:PropertyIsGreaterThan>
        <fes:ValueReference>issueTime</fes:ValueReference>
        <fes:Literal>2009-08-31T12:51:34Z</fes:Literal>
      </fes:PropertyIsGreaterThan>
    </fes:Filter>
  </wfs:Query>
</wfs:GetFeature>

Example Subscribe Request File


When programmatically subscribing to a FeatureType, you must pass in an XML file defining the subscription, the operation, and the filter, like the one below:

<?xml version="1.0" encoding="UTF-8"?>
<Subscribe xmlns="http://docs.oasis-open.org/wsn/b-2"
    xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wfs="http://www.opengis.net/wfs/2.0"
    xmlns:fes="http://www.opengis.net/fes/2.0" xmlns:gml="http://www.opengis.net/gml/3.2"
    xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:owsnt="http://www.opengis.net/owsnt/1.1"
    xmlns:nawx="http://www.faa.gov/nawx/1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.w3.org/2005/08/addressing
     ../../../../../../../ogc-bindings/schemas/org/w3/2005/08/addressing/ws-addr.xsd
     http://docs.oasis-open.org/wsn/b-2
     ../../../../../../../ogc-bindings/schemas/org/oasis/wsn/1.3.0/b-2.xsd
     http://www.opengis.net/wfs/2.0
     ../../../../../../../ogc-bindings/schemas/net/opengis/wfs/2.0.0/wfs.xsd">

    <!--
        Consumer reference is required element for WS-Notification subscription operation
        
        Address is conventionally a callback for subscription producer to send events to.
        However, true callbacks in the sense of a producer opening a socket connection
        on the client side are problematic from a security perspective. The strategy used
        here is to specifyu the empty string for the consumer address as a signal that
        the subscriber will pull from server, and server needs to set up the endpoint.
        Note that this is not quite the same as creating a 'PullPoint' as described in
        the WSN documentation (this strategy can leverage middleware transport more directly).
    -->
    <ConsumerReference>
        <!--
            Address is callback for subscription producer to send events to.
            Setting to empty string is signal that subscriber will pull from
            server, and server needs to set up the endpoint (gets around
            firewall issues). Note that this is not quite the same as creating
            a WSN 'PullPoint' (leverages middleware transport more directly)
        -->
        <wsa:Address/>

        <!--
            Reference parameter for server to pass along with each notification
            message. (Opaque callback argument)
        -->
        <wsa:ReferenceParameters>
            <wsa:RelatesTo/>
        </wsa:ReferenceParameters>

    </ConsumerReference>

    <!--
        WSN supports an language-independent Filter element here. In our usage, the
        OGC query further-down in the message holds any filter information (implicit
        in the query)
    -->

    <!--
        Request a 30 minute subscription duration (server can override)
        Subscriber is responsible for renewing subscription prior to expiration
    -->
    <InitialTerminationTime>PT30M</InitialTerminationTime>

    <!--
        Subscription Policy block is intended for a variety of miscellaneous information, such
        as how often messages should be transmitted (maximum rate between updates). The syntax
        of the miscellaneous info is left to the application.
        One exception is the 'UseRaw' field, whose presence indicates that messages are to
        to be published in raw form rather than wrapped in a WSN Notify element
    -->
    <SubscriptionPolicy>
        <UseRaw/>
        <!-- Anything can go here... -->

    </SubscriptionPolicy>

    <!-- Any content allowed beyond this point. -->

    <!--
        Subscription protocol.
    -->
    <owsnt:Protocol>jms-tcp</owsnt:Protocol>

    <!--
        Explicitly specify the desired pub/sub topic name. If omitted, the server will choose an
        appropriate topic name
    -->

    <!--
        WFS operation embedded within subscription request. The implicit meaning of a subscription
        is to make the GetFeature operation persistent. Changes in the database that are relevant to the
        query are communicated to suscribers through notification messages (feature collection updates in
        this case)
    -->
    <wfs:GetFeature service="WFS" version="2.0.0" outputFormat="text/xml; subtype=gml/3.2.1">
        <wfs:Query typeNames="nawx:LightningFlash">
            <fes:Filter>
                <fes:PropertyIsEqualTo>
                    <fes:ValueReference>//nawx:numStrokes</fes:ValueReference>
                    <fes:Literal>3</fes:Literal>
                </fes:PropertyIsEqualTo>
            </fes:Filter>
        </wfs:Query>
    </wfs:GetFeature>
</Subscribe>

Example Subscribe Response File


When programmatically subscribing to a FeatureType, you will receive an XML file in response, like the one below:

<?xml version="1.0" encoding="UTF-8"?>
<wsnt:SubscribeResponse xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"
  xmlns:wsa="http://www.w3.org/2005/08/addressing"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.w3.org/2005/08/addressing
    ../../../../../../org/w3/2005/08/addressing/ws-addr.xsd
  http://docs.oasis-open.org/wsn/b-2
    ../../../../../../org/oasis/wsn/1.3.0/b-2.xsd">

  <!--
    Subscription reference is endpoint for subscription manager for subscription renewal
    or cancellation requests. May be the same as the endpoint that the original subscription
    operation was invoked on
  -->
  <wsnt:SubscriptionReference>

    <wsa:Address>http://www.example.org/SubscriptionManager</wsa:Address>
    <!--
      Want to pass unique subscription id here in addition to endpoint above. WS-Addressing
      seems to indicate that wsa:ReferenceProperties is the appropriate element, but it is
      not allowed here by wsn.  wsa:ReferenceParameters is allowed though.
      This id is used for subsequent operations on this subscription.
    -->
    <wsa:ReferenceParameters>
      <wsa:RelatesTo>urn:uuid:01234567-0123-4012-a012-0123456789ab</wsa:RelatesTo>
    </wsa:ReferenceParameters>

  </wsnt:SubscriptionReference>

  <!--
    After this point, subscription response can carry any XML. For WFS subscription
    based on JMS message broker, we want to return a URL for the JMS topic to hook
    up to.
  -->

  <wsa:EndpointReference>
    <wsa:Address>jms-tcp://0.0.0.0:61616/topic/dynamicTopics/data</wsa:Address>
  </wsa:EndpointReference>

</wsnt:SubscribeResponse>

Example PauseSubscription Request and Response Files


When pausing an existing subscription, you must pass the WFSRI an XML file like the one below:

<b:PauseSubscription xmlns:b="http://docs.oasis-open.org/wsn/b-2">
  <add:ReferenceParameters xmlns:add="http://www.w3.org/2005/08/addressing">
    <add:RelatesTo>urn:uuid:29e9e60f-b3f9-4020-ab58-ee72918aef4f</add:RelatesTo>
  </add:ReferenceParameters>
</b:PauseSubscription>

You will receive a short XML file in response, like the one below:

<b:PauseSubscriptionResponse xmlns:b="http://docs.oasis-open.org/wsn/b-2"/>

Example ResumeSubscription Request and Response Files


When resuming a paused subscription, you must pass the WFSRI an XML file like the one below:

<b:ResumeSubscription xmlns:b="http://docs.oasis-open.org/wsn/b-2">
  <add:ReferenceParameters xmlns:add="http://www.w3.org/2005/08/addressing">
    <add:RelatesTo>urn:uuid:29e9e60f-b3f9-4020-ab58-ee72918aef4f</add:RelatesTo>
  </add:ReferenceParameters>
</b:ResumeSubscription>

You will receive a short XML file in response, like the one below:

<b:ResumeSubscriptionResponse xmlns:b="http://docs.oasis-open.org/wsn/b-2"/>

Example RenewSubscription Request and Response Files


When renewing a subscription that is about to expire, or giving a new expiration time to a subscription without one, you must pass the WFSRI an XML file like the one below:

<wsnt:Renew xsi:schemaLocation="http://www.w3.org/2005/08/addressing
     ../../../../../../../ogc-bindings/schemas/org/w3/2005/08/addressing/ws-addr.xsd
      http://docs.oasis-open.org/wsn/b-2
     ../../../../../../../ogc-bindings/schemas/org/oasis/wsn/1.3.0/b-2.xsd"
   xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"
   xmlns:wsa="http://www.w3.org/2005/08/addressing"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <!--Request a subscription renewal of 30-minute duration.
       Data subscriber is responsible for renewing subscription prior to expiration-->
  <wsnt:TerminationTime>PT30M</wsnt:TerminationTime>
  <!--Specify the subscription id in the renew request.WSN doesn't use the notion of
        subscription ids in addition to a subscription manager endpoint, though WS-Eventing
        and UPnP do. WSN is extensible though, so the subscription id concept is easy to
        implement using WS-Addressing elements. That is the strategy adopted here.-->
  <add:ReferenceParameters xmlns:add="http://www.w3.org/2005/08/addressing">
    <add:RelatesTo>urn:uuid:9bfb398b-eb88-4cb2-9192-1a473b64d9f5</add:RelatesTo>
  </add:ReferenceParameters>
</wsnt:Renew>

You will receive a short XML file in response, like the one below:

<b:RenewResponse xmlns:b="http://docs.oasis-open.org/wsn/b-2">
  <b:TerminationTime>2010-06-24T22:05:08.844Z</b:TerminationTime>
</b:RenewResponse>

Example Unsubscribe Request and Response Files


To Unsubscribe from an existing subscription, you must pass the WFSRI an XML file like the one below:

<b:Unsubscribe xmlns:b="http://docs.oasis-open.org/wsn/b-2">
  <add:ReferenceParameters xmlns:add="http://www.w3.org/2005/08/addressing">
    <add:RelatesTo>urn:uuid:bd8cd93d-05e5-493a-8d43-e05d40539a0d</add:RelatesTo>
  </add:ReferenceParameters>
</b:Unsubscribe>

You will receive a short XML file in response, like the one below:

<b:UnsubscribeResponse xmlns:b="http://docs.oasis-open.org/wsn/b-2"/>

WFSRI 3.5
Last Guide Revision:
June 30, 2011
  • No labels