Update on boolean properties fails
----------------------------------
Key: GEOS-1475
URL: http://jira.codehaus.org/browse/GEOS-1475
Project: GeoServer
Issue Type: Bug
Components: WFS
Affects Versions: 1.6.0-beta4
Reporter: Andrea Aime
Assignee: Andrea Aime
Fix For: 1.6.0-RC1
The following unit test fail because the boolean property is set to a DefaultAttribute that does not know how to deal with string -> boolean conversion.
I guess either DefaultAttribute learns to deal with converters or we have to roll a BooleanAttribute
{code}
public void testUpdateReprojectFilter() throws Exception {
// slightly adapted from CITE WFS 1.1, "Test wfs:wfs-1.1.0-LockFeature-tc3.1"
// perform an update
String xml = "<wfs:Transaction service=\"WFS\" version=\"1.1.0\" "
+ "xmlns:cgf=\"http://www.opengis.net/cite/geometry\\" "
+ "xmlns:ogc=\"http://www.opengis.net/ogc\\" "
+ "xmlns:wfs=\"http://www.opengis.net/wfs\\" "
+ "xmlns:gml=\"http://www.opengis.net/gml\\"> "
+ "<wfs:Update handle=\"upd-1\" typeName=\"sf:GenericEntity\">"
+ "<wfs:Property>"
+ " <wfs:Name>sf:boolProperty</wfs:Name>"
+ " <wfs:Value>true</wfs:Value>"
+ "</wfs:Property>"
+ " <ogc:Filter>"
+ " <ogc:BBOX>"
+ " <ogc:PropertyName>sf:attribut.geom</ogc:PropertyName>"
+ " <gml:Envelope srsName=\"urn:x-ogc:def:crs:EPSG:6.11.2:4326\">"
+ " <gml:lowerCorner>34.5 -10.0</gml:lowerCorner>"
+ " <gml:upperCorner>72.0 32.0</gml:upperCorner>"
+ " </gml:Envelope>"
+ " </ogc:BBOX>"
+ " </ogc:Filter>"
+ "</wfs:Update> </wfs:Transaction>";
System.out.println(xml);
Document dom = postAsDOM( "wfs", xml );
assertEquals( "wfs:TransactionResponse", dom.getDocumentElement().getNodeName() );
Element totalUpdated = getFirstElementByTagName(dom, "wfs:totalUpdated" );
assertEquals( "3", totalUpdated.getFirstChild().getNodeValue() );
}
{code}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira