[ 
https://issues.apache.org/jira/browse/CXF-2472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12766075#action_12766075
 ] 

Michael Allman commented on CXF-2472:
-------------------------------------

Ok.  If we log both exceptions, that's fine by me.  I just want to see the 
stacktrace of the original fault in the server log somewhere.

I've never run into a case in which I cared what the processing exception was.  
I always knew it was caused by the fact that the system was trying to write a 
fault to a response object that had already started writing the response 
message.

Also, you didn't mention XMLStreamException vs. RuntimeException.  I know the 
StAX spec says XMLStreamReader/XMLStreamWriter methods aren't supposed to throw 
RuntimeExceptions, but there appear to be bugs in Sun's JDK 6 implementation in 
which RuntimeExceptions are thrown in some cases.  Thus, we need to catch and 
handle all exceptions, not just XMLStreamExceptions.

Cheers.

> if exception in fault handling, throw fault instead of processing exception
> ---------------------------------------------------------------------------
>
>                 Key: CXF-2472
>                 URL: https://issues.apache.org/jira/browse/CXF-2472
>             Project: CXF
>          Issue Type: Improvement
>          Components: Soap Binding
>    Affects Versions: 2.2.4, 2.2.5
>            Reporter: Michael Allman
>            Priority: Minor
>         Attachments: SoapFaultOutInterceptors.patch
>
>
> In Soap11FaultOutInterceptor and Soap12FaultOutInterceptor, if we encounter 
> an XMLStreamException writing the fault, we throw a new Fault wrapping that 
> processing exception.  Runtime exceptions are not caught, and the original 
> fault is lost.  I've attached a patch addressing both of these issues.
> With this patch, if there's a processing exception we will see the original 
> fault in the server logs rather than the processing exception.  From my 
> experience, logging this fault is much more valuable than logging the 
> processing exception.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to