hello Justin,
thanks again for your quick turn-around!
On Thu, 12 Feb 2009 03:04:04 pm Justin Deoliveira wrote:
Hi Raif,
Looking at the original request I just noticed something. IT has be
specified as "matchCase", rather than "matchcase".
you probably meant the other way around 
Too much
case-insensitivity going on ;). Try that and let me know if it works.
when i try with matchCase i get:
* WFS 1.0, matchCase="false", for both shapefile- and postgis-
based features:
<ServiceException>
java.lang.RuntimeException: Parsing failed for PropertyIsEqualTo: java.lang.ClassCastException: java.lang.String cannot be cast to
java.lang.Boolean
Parsing failed for PropertyIsEqualTo: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean
java.lang.String cannot be cast to java.lang.Boolean
Details:
org.geoserver.platform.ServiceException: java.lang.RuntimeException: Parsing failed for PropertyIsEqualTo: java.lang.ClassCastException:
java.lang.String cannot be cast to java.lang.Boolean
at org.geoserver.ows.Dispatcher.exception(Dispatcher.java:1177)
at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:198)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:139)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:684)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:625)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:392)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:357)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:459)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1054)
at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1045)
at org.geoserver.filters.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:170)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1045)
at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:73)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1045)
at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:47)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1045)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:178)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:229)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1045)
...
* the same above but with the value of the matchCase attribute without
the quotes, as would be expected, throws a different exception. here
are the first few lines:
<ServiceException>
Open quote is expected for attribute "matchCase" associated with an element type "PropertyIsEqualTo".
* WFS 1.1, matchCase="false", with both shapefile- and postgis-
based features work and return the expected result! so this could
be the work-around i need.
thank you muchly for your help!
off the top of your head, do you know if later versions of GeoServer
handle the matchCase attribute correctly for WFS 1.0?
-Justin
Raif S. Naffah wrote:
> hello Justin,
>
> thanks for your prompt reply! i was testing with a shapefile-based
> feature but i next tried with a PostgreSQL/PostGIS one, both with
> WFS 1.0 and 1.1 and matchcase values "0", "1", "true" and "false".
> unfortunately i still do not get the right feature so it looks like
> it's not working with both types of data-stores.
>
> On Thu, 12 Feb 2009 02:42:14 am Justin Deoliveira wrote:
>> Hi Raif,
>>
>> A couple of things. First case sensitivity is technically only
>> available in wfs 1.1. Although I believe GeoServer should respect
>> it in a 1.0 request. Second, case sensitivity is unfortunately
>> only available with postgis. Which backend are you using?
>>
>> Raif S. Naffah wrote:
>>> hello all,
>>>
>>> i'm using GeoServer 1.6.4b and am trying to use a WFS GetFeature
>>> request with a filter that ignores the case of a feature string
>>> property but so far unsuccessfully. may be a GeoServer developer
>>> or a more experienced user can help:
>>>
>>> using the Sample Request page on GeoServer's GUI, after selecting
>>> the WFS_getFeature-1.0.xml Request drop-down item, and replacing
>>> the FID filter with a PropertyIsEqualTo (xml follows), both cases
>>> of matchcase="0" and "1" fail returning the state.
>>>
>>> <wfs:GetFeature service="WFS" version="1.0.0"
>>> outputFormat="GML2"
>>> xmlns:topp="http://www.openplans.org/topp"
>>> xmlns:wfs="http://www.opengis.net/wfs"
>>> xmlns:ogc="http://www.opengis.net/ogc"
>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>> xsi:schemaLocation="http://www.opengis.net/wfs
>>>
>>> http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd">
>>> <wfs:Query typeName="topp:states">
>>> <ogc:Filter>
>>> <PropertyIsEqualTo matchcase="0">
>>> <PropertyName>STATE_NAME</PropertyName>
>>> <Literal>DELAWARE</Literal>
>>> </PropertyIsEqualTo>
>>> </ogc:Filter>
>>> </wfs:Query>
>>> </wfs:GetFeature>
>>>
>>> is this a known problem or i'm doing something wrong? if it's
>>> the former, is there a known workaround?
>>>
>>>
>>> TIA + cheers;
>>> rsn
cheers;
rsn