Hi 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
http://cxf.apache.org/docs/jax-rs-data-bindings.html#JAX-RSDataBindings-ConfiguringJAXBprovider thanks, Sergey On Sat, Apr 9, 2011 at 1:25 AM, wsdev <[email protected]> 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: > http://cxf.547215.n5.nabble.com/JAXB-and-REST-Response-tp4292165p4292165.html > Sent from the cxf-user mailing list archive at Nabble.com. >
