I'm having some difficulty when using a Logical OR
in a WFS query to get multiple postcodes. This code works fine when it's only 1 PropertyIsEqualTo
filter, but when I wrap the OR around more than one PropertyIsEqualTo
filter I get an exception.
POST http://intranet.nottscc.gov.uk/maps/wfs HTTP/1.1
User-Agent: Fiddler
Content-Type: text/xml
Host: intranet.nottscc.gov.uk
Content-Length: 1875
Expect: 100-continue
<wfs:GetFeature service="WFS" version="1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wfs="http://www.opengis.net/wfs" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml" xmlns:ncc="http://nottinghamshire.gov.uk" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">
<wfs:Query typeName="ncc:OSCodepoint_15KM">
<wfs:PropertyName>ncc:FORMAT1</wfs:PropertyName>
<wfs:PropertyName>ncc:EASTING</wfs:PropertyName>
<wfs:PropertyName>ncc:NORTHING</wfs:PropertyName>
<ogc:Filter>
<ogc:OR>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>ncc:FORMAT3</ogc:PropertyName>
<ogc:Literal>NG156LR</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>ncc:FORMAT3</ogc:PropertyName>
<ogc:Literal>NG163GP</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>ncc:FORMAT3</ogc:PropertyName>
<ogc:Literal>NG158AY</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>ncc:FORMAT3</ogc:PropertyName>
<ogc:Literal>NG171ER</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:OR>
</ogc:Filter>
</wfs:Query>
</wfs:GetFeature>
This is the Error message I get.
<?xml version="1.0" encoding="UTF-8"?>
<ows:ExceptionReport version="1.0.0" xsi:schemaLocation="http://www.opengis.net/ows http://intranet.nottscc.gov.uk/maps/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="NoApplicableCode">
<ows:ExceptionText>Error occurred getting features Invalid fid filter provides, has no fids inside Invalid fid filter provides, has no fids inside</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>
I'm using GeoServer to process the query.
Any help is much appreciated.