update.setFilter(filterfac.id( filterfac.featureId("someid")));
//try with string
propertyType.setValue("myvalue");
Encoder encoder = new Encoder(new WFSConfiguration());
//System.out.println(encoder.encodeAsString(update, WFS.Update));
Document doc = encoder.encodeAsDOM(update, WFS.Update);
XMLAssert.assertXpathEvaluatesTo("mn:mytypename", "//wfs:Update/@typeName", doc);
XMLAssert.assertXpathEvaluatesTo("mn:myproperty", "//wfs:Update/wfs:Property/wfs:Name", doc);
XMLAssert.assertXpathEvaluatesTo("myvalue", "//wfs:Update/wfs:Property/wfs:Value", doc);
XMLAssert.assertXpathEvaluatesTo("someid", "//wfs:Update/ogc:Filter/ogc:FeatureId/@fid", doc);
//try with numeric value
propertyType.setValue(100.25);
encoder = new Encoder(new WFSConfiguration());
//System.out.println(encoder.encodeAsString(update, WFS.Update));
doc = encoder.encodeAsDOM(update, WFS.Update);
XMLAssert.assertXpathEvaluatesTo("100.25", "//wfs:Update/wfs:Property/wfs:Value", doc);
//try with geometry
Coordinate insideCoord = new Coordinate(5.2, 7.5);
Point myPoint = geomfac.createPoint(insideCoord);
propertyType.setValue(myPoint);
encoder = new Encoder(new WFSConfiguration());
//System.out.println(encoder.encodeAsString(update, WFS.Update));
doc = encoder.encodeAsDOM(update, WFS.Update);
XMLAssert.assertXpathEvaluatesTo("5.2", "//wfs:Update/wfs:Property/wfs:Value/gml:Point/gml:coord/gml:X", doc);
XMLAssert.assertXpathEvaluatesTo("7.5", "//wfs:Update/wfs:Property/wfs:Value/gml:Point/gml:coord/gml:Y", doc);
}