2011/12/20 Võrno Lauri <[email protected]>

> Hi,
>
> I’m having trouble with WFS GetFeature requests on GeoServer 2.1.2. I’m
> using layers based on parametric SQL views. These work OK for WMS GetMap
> requests etc, but when I try to execute a GetFeature request, it doesn't
> select any features.
>
> The GetFeature request itself (POST) is as follows:
> <wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs"; service="WFS"
> version="1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xsi:schemaLocation="http://www.opengis.net/wfs
> http://schemas.opengis.net/wfs/1.1.0/wfs.xsd";><wfs:Query
> typeName="base_layer" srsName="EPSG:3301"><ogc:Filter xmlns:ogc="
> http://www.opengis.net/ogc";><ogc:BBOX><ogc:PropertyName>geom</ogc:PropertyName><gml:Envelope
> xmlns:gml="http://www.opengis.net/gml";
> srsName="EPSG:3301"><gml:lowerCorner>658696.56181972
> 6473865.7264151</gml:lowerCorner><gml:upperCorner>658758.65067508
> 6473902.0625066</gml:upperCorner></gml:Envelope></ogc:BBOX></ogc:Filter></wfs:Query></wfs:GetFeature>
>
> I’m appending the „VIEWPARAMS“ parameter to the action URL (ex:
> http://geoserver/wfs?VIEWPARAMS=param1:val1) of the request.
>
> Am I doing something wrong here? Should the parameters be given to the
> server in another way (in the filter maybe)?
>

I may be wrong here, but I believe viewparams are supported only if you are
doing GET requests, if you mix a POST and GET style
they will be ignored.

Justin (cc'ed), what do you think would be a way to handle this one? The
WFS xml readers get the bean initialized by
the kvp parser, but then ignore it. Should we modify each one to
cherry-pick selected params from the original bean?
Or else, have the GetFeature code ignore the viewparam contained in parsed
beans, and fetch directly the
values from the Dispatcher.REQUEST thread local?

Cheers
Andrea

-- 
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy

phone: +39 0584 962313
fax:      +39 0584 962313
mob:    +39 339 8844549

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

Please take note that GeoSolutions will be closed for Christmas holidays
from 27/12 to 30/12

-------------------------------------------------------
------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to