Hi Ben,

Thanks for the helpful reply. The exception message was indeed 
misleading. A couple of points left, I hope you'd look into them:

1. How come matchCase was supported in version 2.3.5 but not anymore in 
2.8.1? Personally I find it really useful. Is there a way to make a 
search with PropertyIsLike case-insensitive?

2. I had this problem already with version 2.3.5 and it seems to persist 
in version 2.8.1: When the search text contains a German letter with 
umlaut in upper-case (Ü, Ö, Ä), I got the exception "Attempted to 
construct illegal filter - I dont understand the tag: 
fes:ValueReference.  HINT: tags are case-sensitive!".  ü, ö, ä are 
however fine. As an added advantage with matchCase='false' I could get 
around this problem, but not anymore in 2.8.1. If possible could you 
shed some light on this?

Any hints or pointers are much appreciated!

Best regards,
Nhan Vo



On 1/20/2016 11:44 PM, Ben Caradoc-Davies wrote:
> Nhan Vo,
>
> neither singleChar="%" nor singleChar="#" work for me until I 
> percent-encode them as singleChar="%25" or singleChar="%23" 
> respectively. "%" is used for URL percent-encoding and "#" is the URL 
> fragment separator and neither can be used unencoded in a URL. I am 
> surprised that either worked for you before. Perhaps older Java or 
> GeoServer was more permissive, or your client is encoding one but not 
> the other? I think Java 8 may have added better unicode support in 
> percent decoding; this may be the change.
>
> Furthermore, matchCase is not permitted on PropertyIsLike. Including 
> this attribute caused the rather unhelpful error message: "Attempted 
> to construct illegal filter - I dont understand the tag: 
> fes:ValueReference.  HINT: tags are case-sensitive!"
>
> Both of these URLs work for me against the current GeoServer master 
> release configuration with Java 8:
>
> http://localhost:8080/geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&typenames=topp:states&filter=%3Cfes:Filter%20xmlns:fes=%22http://www.opengis.net/fes/2.0%22%3E%3Cfes:PropertyIsLike%20wildCard=%22*%22%20singleChar=%22%23%22%20escapeChar=%22!%22%3E%3Cfes:ValueReference%3Etopp:STATE_NAME%3C/fes:ValueReference%3E%3Cfes:Literal%3E*%3C/fes:Literal%3E%3C/fes:PropertyIsLike%3E%3C/fes:Filter%3E
>  
>
>
> http://localhost:8080/geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&typenames=topp:states&filter=%3Cfes:Filter%20xmlns:fes=%22http://www.opengis.net/fes/2.0%22%3E%3Cfes:PropertyIsLike%20wildCard=%22*%22%20singleChar=%22%25%22%20escapeChar=%22!%22%3E%3Cfes:ValueReference%3Etopp:STATE_NAME%3C/fes:ValueReference%3E%3Cfes:Literal%3E*%3C/fes:Literal%3E%3C/fes:PropertyIsLike%3E%3C/fes:Filter%3E
>  
>
>
> Kind regards,
> Ben.
>
> On 21/01/16 02:04, Nhan Vo wrote:
>> Hi,
>>
>> Thanks for the response. This URL works:
>> http://192.168.0.102:8081/geoserver/wfs?VERSION=2.0.0&SERVICE=WFS&REQUEST=GetFeature&TYPENAME=topp:states&FILTER=%3Cfes:Filter%20xmlns:fes='http://www.opengis.net/fes/2.0'%20xmlns:gml='http://www.opengis.net/gml/3.2'%3E%3Cfes:PropertyIsLike%20matchCase='false'%20wildCard='*'%20singleChar='%'%20escapeChar='!'%3E%3Cfes:ValueReference%3Etopp:STATE_NAME%3C/fes:ValueReference%3E%3Cfes:Literal%3E*%3C/fes:Literal%3E%3C/fes:PropertyIsLike%3E%3C/fes:Filter%3E
>>  
>>
>>
>>
>> This does not work:
>> http://192.168.0.102:8081/geoserver/wfs?VERSION=2.0.0&SERVICE=WFS&REQUEST=GetFeature&TYPENAME=topp:states&FILTER=%3Cfes:Filter%20xmlns:fes='http://www.opengis.net/fes/2.0'%20xmlns:gml='http://www.opengis.net/gml/3.2'%3E%3Cfes:PropertyIsLike%20matchCase='false'%20wildCard='*'%20singleChar='#'%20escapeChar='!'%3E%3Cfes:ValueReference%3Etopp:STATE_NAME%3C/fes:ValueReference%3E%3Cfes:Literal%3E*%3C/fes:Literal%3E%3C/fes:PropertyIsLike%3E%3C/fes:Filter%3E
>>  
>>
>>
>> The only difference is /*singleChar='%'*/ and /*singleChar='#'*/.
>>
>> Best regards,
>> Nhan Vo
>>
>> On 1/20/2016 1:53 PM, Rahkonen Jukka (MML) wrote:
>>>
>>> Hi,
>>>
>>> Can you reproduce the issue with the demo layer ”states”? If you 
>>> can, please
>>> send the whole GET url for making testing convenient for the others.
>>>
>>> Regards,
>>>
>>> -Jukka Rahkonen-
>>>
>>> Nhan Vo wrote:
>>>
>>> Hi list,
>>>
>>> I'm upgrading Geoserver from 2.3.5 to 2.8.1 and my client code 
>>> cannot work
>>> anymore. Basically it sends a WFS Url request with a filter to 
>>> Geoserver. The
>>> filter looks as follows:
>>>
>>> <fes:Filter xmlns:fes='http://www.opengis.net/fes/2.0'
>>> xmlns:gml='http://www.opengis.net/gml/3.2'>
>>>     <fes:PropertyIsLike matchCase='false' wildCard='*' singleChar='#'
>>> escapeChar='!'>
>>> <fes:ValueReference>...</fes:ValueReference>
>>>         <fes:Literal>...</fes:Literal>
>>>     </fes:PropertyIsLike>
>>> </fes:Filter>
>>>
>>> With version 2.8.1 I receive the exception message:*XML document 
>>> structures
>>> must start and end within the same entity*
>>>
>>> I have been able to get around this by replacing */singleChar='#'/* 
>>> with
>>> */singleChar='%'/*, but still cannot understand why the '#' causes the
>>> problem. Also, '.' and '_' do not work either and I receive the same 
>>> exception
>>> message. Only '%' works.
>>>
>>> Btw, Geoserver 2.3.5 was running with Java 6; when I updated to 
>>> 2.8.1 I also
>>> updated to Java 8.
>>>
>>> If someone could shed some light on this I'd appreciate it.
>>>
>>> Best regards,
>>> Nhan Vo
>>>
>>>
>>
>>
>> ------------------------------------------------------------------------------
>>  
>>
>> Site24x7 APM Insight: Get Deep Visibility into Application Performance
>> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
>> Monitor end-to-end web transactions and take corrective actions now
>> Troubleshoot faster and improve end-user experience. Signup Now!
>> http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
>>
>>
>>
>> _______________________________________________
>> Geoserver-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>
>


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to