Download Oracle Spatial User's Guide and Reference

Transcript
Request and Response XML Examples
Example 15–4
DescribeFeatureType Response
<xsd:schema targetNamespace="http://www.myserver.com/myns"
xmlns:wfs="http://www.opengis.net/wfs" xmlns:myns="http://www.myserver.com/myns"
xmlns:gml="http://www.opengis.net/gml" elementFormDefault="qualified"
version="1.0.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:import namespace="http://www.opengis.net/gml"
schemaLocation="http://localhost:8888/examples/servlets/xsds/feature.xsd"/>
<xsd:element name="COLA" type="myns:COLAType" substitutionGroup="gml:_
Feature"/>
<xsd:complexType name="COLAType">
<xsd:complexContent>
<xsd:extension base="gml:AbstractFeatureType">
<xsd:sequence>
<xsd:element name="MKT_ID" type="xsd:double"/>
<xsd:element name="NAME" nillable="true">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="32"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="SHAPE" type="gml:PolygonMemberType"
nillable="true"/>
</xsd:sequence>
<xsd:attribute name="fid" type="xsd:double"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:schema>
Example 15–5 is a request to get the MKT_ID, NAME, and SHAPE properties of the
feature or features of type COLA where the MKT_ID value is greater than 2 and the
NAME value is equal to cola_c, or where the MKT_ID value is greater than 3 and the
NAME value is equal to cola_d.
Note: For GetFeature and GetFeatureWithLock, the <Query> and
<PropertyName> elements, which list the property names to be
selected, can be any top-level element of the queried feature type, in
which case its entire content (which may be nested) is returned in the
query response. XPaths of arbitrary depth are not supported in
<PropertyName> elements directly under the <Query> element;
however, they are supported in <PropertyName> elements in a
<Filter> element under the <Query> element, as shown in
Example 15–5 and Example 15–7.
Example 15–5
GetFeature Request
<?xml version="1.0" ?>
<wfs:GetFeature
service="WFS"
version="1.0.0"
xmlns:wfs="http://www.opengis.net/wfs"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:myns="http://www.myserver.com/myns"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfs ../wfs/1.0.0/WFS-basic.xsd">
<wfs:Query typeName="myns:COLA">
<ogc:PropertyName>myns:MKT_ID</ogc:PropertyName>
Beta Draft
Web Feature Service (WFS) Support 15-7