cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <>
Subject Re: JAXB and REST Response
Date Sat, 09 Apr 2011 15:17:47 GMT

Do you mean you'd like to prevent malformed XML being sent back, in case
when JAXB failed to finish the serializaton process ? The only option here
is to cash the response, use an "enableBuffering' and 'enableStreaming'
properties, see

thanks, Sergey

On Sat, Apr 9, 2011 at 1:25 AM, wsdev <> wrote:

> Hi,
> I'm creating a RESTful service with CXF that creates a resource when the
> user POSTs some XML. The service works fine when the XML is valid, but when
> I send some bad XML, JAXB can't convert it to my java bean and sends back a
> 500 Internal Server error. How can I make it so that if bad XML is sent to
> my service, I capture it and send back a 400 Bad Request response.
> Any help is greatly appreciated!!
> Thanks,
> Steve
> --
> View this message in context:
> Sent from the cxf-user mailing list archive at

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message