[geotk] CSW client : unmarshalling issue
Damiano ALBANI
damiano.albani at univ-nantes.fr
Thu May 12 09:49:13 EDT 2011
Hello,
I was testing the Insert/Update/Delete transactions API of the CSW
client and I've had an issue related to XML namespaces.
Given the following code:
PropertyIsEqualToType propertyIsEqualTo =
new PropertyIsEqualToType(new LiteralType(identifier),
new PropertyNameType(new
QName("http://www.opengis.net/cat/csw/apiso/1.0", "Identifier")),
null);
FilterType filter = new FilterType(propertyIsEqualTo);
QueryConstraintType queryConstraint = new QueryConstraintType();
queryConstraint.setVersion("1.1.0");
queryConstraint.setFilter(filter);
DeleteType delete = new DeleteType();
delete.setConstraint(queryConstraint);
request = cswServer.createTransaction();
request.setDelete(delete);
The XML produced by Geotoolkit doesn't contain any reference to the
namespace, be it the prefix or the NS declaration on the root element :
<csw:Delete>
<csw:Constraint version="1.1.0">
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>Identifier</ogc:PropertyName>
<ogc:Literal>7d26184c-3cf8-4475-991f-3b8a454d5138</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
</csw:Constraint>
</csw:Delete>
I've put the full XML dump on <http://pastebin.com/uQrDq9my>.
As you can see, many namespaces are declared (even if not used ?!) but
not the AP ISO one.
That missing NS declaration causes some problems with deegree3 CSW
server -- though, strangely enough, deegree3 is not bothered by the
missing NS in an Update request, instead of a Delete one...
Thanks,
--
Damiano ALBANI
More information about the Geotoolkit
mailing list