Hi Sergey,

I checked your ExceptionMapper. I'm not able to find that much difference other than I do some email notifications before returning the response object. :'( Would me using the snapshot got anything to do with it?

I got lost somewhere after this:

writer.writeTo(responseObj, targetType, invoked.getGenericReturnType(), invoked != null ? invoked.getAnnotations() : new Annotation[]{},
                              responseType,
                              response.getMetadata(),
                              out);

Would it be possible that this might have something to do with it:

javax.xml.transform.Result

I'm not really sure... I'll try to investigate further

Gabo

Sergey Beryozkin wrote:
Hi Gabo

I've updated one of the tests to show that an exception mapper can report a text/plain message and no Result tags are added. Have a look please at [1]

here's the trace :
*****************************
HTTP/1.1 500 Internal Server Error
Content-Type: text/plain
Content-Length: 28
Server: Jetty(6.1.11)

No book found at all : 12345
*****************************
> Is it possible to specify a custom provider from an ExceptionMapper implementation

No, ExceptionMapper is a provider itself

 I was hoping to avoid the chain-abort work-around.

I thought you removed the chain-abort work-around ?

I'm sorry if I'm missing something. Obviously, those gremlin <Result> tags are added somewhere, but I just don't see at the moment where. Is there any chance you can debug the code a bit, starting from JAXRSOutInterceptor ?

Thanks, Sergey

[1] https://svn.apache.org/repos/asf/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/BookExceptionMapper.java

Reply via email to