Hello,
How about this problem? In my database I have a VARCHAR column, but the characters are always just numbers. Geoserver WFS DescribeFeatureType reports about this:
* <xs:element xmlns="http://www.w3.org/2001/XMLSchema" minOccurs="0" name="PLOHKONRO" nillable="true">
* <xs:simpleType xmlns="http://www.w3.org/2001/XMLSchema">
* <xs:restriction xmlns="http://www.w3.org/2001/XMLSchema" base="xs:string">
* <xs:maxLength xmlns="http://www.w3.org/2001/XMLSchema" value="2147483647"></xs:maxLength>
</xs:restriction>
</xs:simpleType>
</xs:element>
Then I send the following request with PLOHKONRO filter:
<?xml version="1.0" encoding="ISO-8859-1"?>
<wfs:GetFeature xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml" xmlns:wfs="http://www.opengis.net/wfs" service="WFS" version="1.0.0" maxFeatures="1000" outputFormat="GML2">
<wfs:Query xmlns:topp="http://www.openplans.org/topp" typeName="topp:GIS_POLYGONS">
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName xmlns:topp="http://www.openplans.org/topp">
topp:PLOHKONRO</ogc:PropertyName>
<ogc:Literal>
<![CDATA[8870234617]]>
</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
</wfs:Query>
</wfs:GetFeature>
When Geoserver sends this to Oracle, the string with number character has turned into number:
feature type: topp:GIS_POLYGONS
filter: [ PLOHKONRO = 8.870234617E9 ]
[properties: ALL ]
I was wondering if I should use "like" request instead, but that sends also number to Oracle:
<?xml version="1.0" encoding="ISO-8859-1"?>
<wfs:GetFeature xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml" xmlns:wfs="http://www.opengis.net/wfs" service="WFS" version="1.0.0" maxFeatures="1000" outputFormat="GML2">
<wfs:Query xmlns:topp="http://www.openplans.org/topp" typeName="topp:GIS_POLYGONS">
<ogc:Filter>
<ogc:PropertyIsLike wildCard="*" singleChar="#" escape="!">
<ogc:PropertyName xmlns:topp="http://www.openplans.org/topp">
topp:PLOHKONRO</ogc:PropertyName>
<ogc:Literal>
<![CDATA[8870234617]]>
</ogc:Literal>
</ogc:PropertyIsLike>
</ogc:Filter>
</wfs:Query>
</wfs:GetFeature>
Query
feature type: topp:GIS_POLYGONS
filter: [ PLOHKONRO is like 8.870234617E9 ]
[properties: ALL ]
Is there something wrong with the request that WFS client generates?
-Jukka-