Hi everybody, Here my situation : I set up a map with one WMS layer (geoserver) and I want to select the feature with the OpenLayers.Control.GetFeature(...) using a WFS protocol.
It's working well if I ask for one featureType (featureType:"guadeloupe_ways" in the WFS protocol options). I select features with a box and a function add them to a OL.Vector.Layer() (event "featureselected"). Ok But If I ask for two featureTypes : featureType:["guadeloupe_ways","guadeloupe_vertices"] in the WFS protocol options, it's working only for the first call (I mean the selection works as with one featureType), but for the second call (If I try to select other features), it can't find the featuretype. I looked in the POST request with the firebug console and I find this : First call : <wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" service="WFS" version="1.1.0" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"> <wfs:Query typeName="DEVPgRouting:guadeloupe_ways" srsName="EPSG:900913"> <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"> <ogc:BBOX> <gml:Envelope xmlns:gml="http://www.opengis.net/gml" srsName="EPSG:900913"> <gml:lowerCorner>-6850334.7079709 1827921.1127902</gml:lowerCorner> <gml:upperCorner>-6845557.3937038 1832010.4938028</gml:upperCorner> </gml:Envelope> </ogc:BBOX> </ogc:Filter> </wfs:Query> <wfs:Query typeName="DEVPgRouting:guadeloupe_vertices" srsName="EPSG:900913"> <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"> <ogc:BBOX <gml:Envelope xmlns:gml="http://www.opengis.net/gml" srsName="EPSG:900913"> <gml:lowerCorner>-6850334.7079709 1827921.1127902</gml:lowerCorner> <gml:upperCorner>-6845557.3937038 1832010.4938028</gml:upperCorner> </gml:Envelope> </ogc:BBOX> </ogc:Filter> </wfs:Query> </wfs:GetFeature> and the response contains all the features : good. For the 2nde call : <wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" service="WFS" version="1.1.0" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd" <wfs:Query xmlns:DEVPgRouting="devpgrouting" typeName="DEVPgRouting:guadeloupe_ways,guadeloupe_vertices" srsName="EPSG:900913"> <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"> <ogc:BBOX> <ogc:PropertyName>the_geom</ogc:PropertyName> <gml:Envelope xmlns:gml="http://www.opengis.net/gml" srsName="EPSG:900913"> <gml:lowerCorner>-6844601.9308504 1826850.9943943</gml:lowerCorner> <gml:upperCorner>-6840168.5832104 1830634.6272939</gml:upperCorner> </gml:Envelope> </ogc:BBOX> </ogc:Filter> </wfs:Query> </wfs:GetFeature> And the response is the following exception : <?xml version="1.0" encoding="UTF-8"?> <ows:ExceptionReport version="1.0.0" xsi:schemaLocation="http://www.opengis.net/ows http://***url***:8082/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ows="http://www.opengis.net/ows"> <ows:Exception exceptionCode="InvalidParameterValue" locator="typeName"> <ows:ExceptionText>Could not locate {devpgrouting}guadeloupe_ways,guadeloupe_vertices in catalog.</ows:ExceptionText> </ows:Exception> </ows:ExceptionReport> =>not good :( I understand the problem for geoserver to find the good layers, but I don't understand why the WFS protocol send only one element <wfs:query ...> instead of two as for the first call. If anyone is able to explain why, I'll be glad to hear it :) Maybe I've done something wrong... ----- -- Flavien -- View this message in context: http://osgeo-org.1560.n6.nabble.com/Can-WFS-protocol-change-between-two-calls-tp5039218.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list us...@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/openlayers-users