Hi
On 10/09/12 15:06, sireesh wrote:
Hi Sergey,

The interceptor I've added earlier to check that the response is being
received is reading from the stream and hence the JAXB unmarshaller is
throwing EOF exception.
I removed the interceptor and then the JAXB is throwing exception indicating
that my POJOs don't have setters for the xml elements.

I tried unmarshalling the xml in a test class using a custom
javax.xml.bind.ValidationEventHandler, where I'm ignoring all the
"unexpected element" found exceptions.

I don't know how I can plug in my custom validation event handler while
unmarshalling an xml using CXF APIs

         WebClient authenticationClient = WebClient.create(AUTH_URL);
       AuthenticationResponse authenticationResponse =
authenticationClient.post(authenticationRequest,AuthenticationResponse.class);

Can you please let me know, how I can use the custom validation handler.


JAXBElementProvider has a 'validationEventHandler' property, set that and then pass a JAXBElementProvider reference to WebClient.create

Cheers, Sergey

Regards,
Kiran



--
View this message in context: 
http://cxf.547215.n5.nabble.com/Unable-to-unmarshal-REST-response-into-POJO-tp5713694p5713756.html
Sent from the cxf-user mailing list archive at Nabble.com.


--
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com

Reply via email to