I'm having trouble parsing the XML response received from the service at http://wiki.dbpedia.org/Lookup
My code for the main one is here , toghether with annotated beans, which creates xml.
I would like to “debug” what happens in JAXBContextso that I can see what I messed up in annotated beans. The only thing I found is to register EventHandleras follows:
unmarshaller.setEventHandler(new javax.xml.bind.helpers.DefaultValidationEventHandler());
which prints such errors:
uri http:
DefaultValidationEventHandler: [ERROR]: unexpected element (uri:"http://lookup.dbpedia.org/", local:"Result"). Expected elements are <{}Result>
Location: line 3
There seems to be an unexpected Result element, but I can't fix it. Can someone help me better understand JAXB errors? I really can't understand what the errors really mean (as I already installed namespace = "http://wiki.dbpedia.org/Lookup"in the class ArrayOfResult).
source
share