[geotk] CSW client : unmarshalling issue

Guilhem guilhem.legal at geomatys.fr
Thu May 12 12:03:40 EDT 2011


Hello,

There was in fact, a little dummy bug in the code of the 
propertyNameType constructor.

But we don't handle the QName very well at this point for this object.

with the fix i'm going to push, you'll obtain the following XML :

<csw:Delete>
<csw:Constraint version="1.1.0">
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>http://www.opengis.net/cat/csw/apiso/1.0:Identifier</ogc:PropertyName>
<ogc:Literal>test</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
</csw:Constraint>
</csw:Delete>

I don't know, if this will satisfy degree. I'll try to see if i can 
handle this better when i'll have some time.

Guilhem Legal

Le 12/05/2011 15:49, Damiano ALBANI a écrit :
> 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,
>



More information about the Geotoolkit mailing list