Hi Dan,

I thought a bit more on this and think what would work best for me is this:

* If there is a specific fault detail (as raised by the endpoint
implementation), don't add any stack trace to the response (as the
error is described through the fault detail already)
* If there is no fault detail create one and add the stack trace to it
depending on faultStackTraceEnabled and exceptionMessageCauseEnabled

I implemented this in
org/apache/cxf/binding/soap/interceptor/AbstractSoapInterceptor and
could provide a patch for this in case this behavior makes generally
sense. I'm not totally sure though, how FaultOutInterceptor relates to
this.

-- Gunnar

2011/6/7 Daniel Kulp <[email protected]>:
>
> Looking at the code (Soap##FaultOutInterceptor), it only produces the stack
> trace for the first cause.   It likely could be updated to grab the stack
> traces of all the causes (the cause of the cause type thing) and add those as
> well.   A patch would be welcome.
>
> Dan
>
>
> On Monday, June 06, 2011 4:50:23 PM Gunnar Morling wrote:
>> Hi,
>>
>> in my service I would like to return the complete stack trace to the
>> client in case an unexpected runtime exception occurs on the server.
>>
>> I came across the option "exceptionMessageCauseEnabled" [1] but this
>> only shows the first cause throwable. When using JAX-WS this seems
>> actually to be the thrown exception itself (which is wrapped as cause
>> into a Fault), so this is not really what I'm looking for. Is there a
>> way to return the complete stack trace instead?
>>
>> Btw. the documentation on the parameter "exceptionMessageCauseEnabled"
>> is not totally correct. In the listing "faultStackTraceEnabled" is
>> mentioned instead and I think one also needs to configure the
>> FaultOutInterceptor as the parameter is evaluated there. Should I
>> create a JIRA issue for this?
>>
>> Thanks,
>>
>> Gunnar
>>
>> [1]
>> http://cxf.apache.org/docs/debugging-and-logging.html#DebuggingandLogging-
>> Showingthecauseexceptionmessage
>
> --
> Daniel Kulp
> [email protected]
> http://dankulp.com/blog
> Talend - http://www.talend.com
>

Reply via email to