[geotk] CSW client : unmarshalling issue

Damiano ALBANI damiano.albani at univ-nantes.fr
Tue May 10 10:05:34 EDT 2011


Hello,

I'm using Geotoolkit CSW client (version 3.17) to send requests to a 
deegree3 CSW server.
So far, the "GetCapabilities" works fine but I couldn't get "GetRecords" 
to work.
At least, it doesn't _fully_ work.

Here's what I do :
I build a GetRecordsType object, filled with all its properties.
Then I marshall it into XML and send it over the wire to deegree.
It works great and deegree returns a correct response.

Now, when I want to unmarshall the response into a GetRecordsResponse 
object, I get this exception:

_Exception in thread "main" java.lang.ClassCastException: 
javax.xml.bind.JAXBElement cannot be cast to 
org.geotoolkit.csw.xml.GetRecordsResponse_

What am I doing wrong?

The complete example code is available on : <http://pastebin.com/bRkeXCRr>

Thanks,

-- 
Damiano ALBANI



More information about the Geotoolkit mailing list