In your example request you are trying to obtain a bounding box from a description of a FeatureType, that could never work; the description tells you what type of data can exist in an actual Feature of that type:
So a DescribeFeatureType request for the type topp:states
gives us:
<?xml version="1.0" encoding="UTF-8"?><xsd:schema xmlns:gml="http://www.opengis.net/gml" xmlns:maps="http://boundlessgeo.com" xmlns:nasa="http://nasa.gov" xmlns:ne="http://naturalearthdata.com" xmlns:nurc="http://www.nurc.nato.int" xmlns:og="http://opengeo.org" xmlns:osm="http://openstreemap.org" xmlns:topp="http://www.openplans.org/topp" xmlns:usgs="http://www.usgs.gov/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.openplans.org/topp">
<xsd:import namespace="http://www.opengis.net/gml" schemaLocation="http://demo.opengeo.org:80/geoserver/schemas/gml/3.1.1/base/gml.xsd"/>
<xsd:complexType name="statesType">
<xsd:complexContent>
<xsd:extension base="gml:AbstractFeatureType">
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="0" name="the_geom" nillable="true" type="gml:MultiSurfacePropertyType"/>
<xsd:element maxOccurs="1" minOccurs="0" name="STATE_NAME" nillable="true" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="STATE_FIPS" nillable="true" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="SUB_REGION" nillable="true" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="STATE_ABBR" nillable="true" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="LAND_KM" nillable="true" type="xsd:double"/>
<xsd:element maxOccurs="1" minOccurs="0" name="WATER_KM" nillable="true" type="xsd:double"/>
<xsd:element maxOccurs="1" minOccurs="0" name="PERSONS" nillable="true" type="xsd:double"/>
<xsd:element maxOccurs="1" minOccurs="0" name="FAMILIES" nillable="true" type="xsd:double"/>
<xsd:element maxOccurs="1" minOccurs="0" name="HOUSHOLD" nillable="true" type="xsd:double"/>
<xsd:element maxOccurs="1" minOccurs="0" name="MALE" nillable="true" type="xsd:double"/>
<xsd:element maxOccurs="1" minOccurs="0" name="FEMALE" nillable="true" type="xsd:double"/>
<xsd:element maxOccurs="1" minOccurs="0" name="WORKERS" nillable="true" type="xsd:double"/>
<xsd:element maxOccurs="1" minOccurs="0" name="DRVALONE" nillable="true" type="xsd:double"/>
<xsd:element maxOccurs="1" minOccurs="0" name="CARPOOL" nillable="true" type="xsd:double"/>
<xsd:element maxOccurs="1" minOccurs="0" name="PUBTRANS" nillable="true" type="xsd:double"/>
<xsd:element maxOccurs="1" minOccurs="0" name="EMPLOYED" nillable="true" type="xsd:double"/>
<xsd:element maxOccurs="1" minOccurs="0" name="UNEMPLOY" nillable="true" type="xsd:double"/>
<xsd:element maxOccurs="1" minOccurs="0" name="SERVICE" nillable="true" type="xsd:double"/>
<xsd:element maxOccurs="1" minOccurs="0" name="MANUAL" nillable="true" type="xsd:double"/>
<xsd:element maxOccurs="1" minOccurs="0" name="P_MALE" nillable="true" type="xsd:double"/>
<xsd:element maxOccurs="1" minOccurs="0" name="P_FEMALE" nillable="true" type="xsd:double"/>
<xsd:element maxOccurs="1" minOccurs="0" name="SAMP_POP" nillable="true" type="xsd:double"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:element name="states" substitutionGroup="gml:_Feature" type="topp:statesType"/>
</xsd:schema>
It tells us that topp:states
can have a geometry, but not what the values are.
If you want the bounding box for the set of features that are of type topp:states
then you just need to do a GetCapabilities request, so the following request http://demo.opengeo.org/geoserver/wfs?service=WFS&request=GetCapabilities& tells us:
<FeatureType xmlns:topp="http://www.openplans.org/topp">
<Name>topp:states</Name>
<Title>USA Population</Title>
<Abstract>2000 census data for United States.</Abstract>
<ows:Keywords>
<ows:Keyword>census</ows:Keyword>
<ows:Keyword>united</ows:Keyword>
<ows:Keyword>boundaries</ows:Keyword>
<ows:Keyword>state</ows:Keyword>
<ows:Keyword>states</ows:Keyword>
</ows:Keywords>
<DefaultCRS>urn:ogc:def:crs:EPSG::4326</DefaultCRS>
<ows:WGS84BoundingBox>
<ows:LowerCorner>-124.731422 24.955967</ows:LowerCorner>
<ows:UpperCorner>-66.969849 49.371735</ows:UpperCorner>
</ows:WGS84BoundingBox>
</FeatureType>
If you want to find information about a feature of type topp:states
, you need to do a GetFeature request. If you want to get a feature by its identifier, then there is a stored procedure that will allow you to do this.
So for example to find out information about the topp:states
feature with ID `states.1' you could use (returning JSON):
http://demo.opengeo.org/geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&STOREDQUERY_ID=urn:ogc:def:query:OGC-WFS::GetFeatureById&ID=states.1&outputformat=json&
and for information about the topp:states
feature with ID `states.30' you could use (returning XML):
http://demo.opengeo.org/geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&STOREDQUERY_ID=urn:ogc:def:query:OGC-WFS::GetFeatureById&ID=states.30&
http://demo.opengeo.org/geoserver/wfs?version=1.3.0&request=describeFeatureType&outputFormat=application/json&service=WFS&typeName=topp:states
http://demo.opengeo.org/geoserver/wfs?service=WFS&request=DescribeFeatureType&typename=topp:states&outputFormat=text/xml;%20subtype=gml/3.1.1&
that's without any version at all.