[OpenLayers-Users] WFS request to GeoServer to retrieve "name" & "featureNS"

Andreas Hocevar ahocevar at opengeo.org
Mon Sep 5 18:55:57 EDT 2011


Hi,

you don't need the namespace prefix. According to the WFS 1.1.0 spec, the KVP format for DescribeFeatureType is as follows:

http://demo.opengeo.org/geoserver/wfs?service=wfs&version=1.1.0&request=DescribeFeatureType&typename=myns:states&namespace=xmlns(myns=http://www.openplans.org/topp)

This means you can choose an arbitrary prefix (myns in this case), and then you use the namespace parameter to provide the namespace uri and map it to the prefix.

Andreas.

On Sep 4, 2011, at 04:03 , Simon wrote:

> I tried WFSGetCapabilities and sent a GetCapabiliteis request to geoservr.
>> From the result of WFSGetCapabilities().read(), I can loop each featureType
> and retrieve some basic info(e.g., name, title, featureNS, srsName). Then in
> order to retieve the "geometryName" property of this feature type, (which is
> needed to load this featureLayer into map), I sent a DescribeFeatureType
> request to server by attaching "&TypeName="feature.name. However, i found
> that the full name of the feature is truncated, i.e., feature.name is the
> feature's name without its namespace prefix. However, this namespace prefix
> is needed in DescribeFeatureType request URL.
> 
> my question is, how can I get the full name (with namespace prefix) in order
> to execute this DescribeFeatureType request and retrieve the geometryName
> property?
> 
> appreciate any helps!!!!
> 
> --
> View this message in context: http://osgeo-org.1803224.n2.nabble.com/WFS-request-to-GeoServer-to-retrieve-name-featureNS-tp6757618p6757618.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users



-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.



More information about the Users mailing list