cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bin Zhu <>
Subject SOAPFault message improvement in CXF when there is unchecked NPE
Date Thu, 29 Nov 2012 03:18:31 GMT

When there is unchecked NPE thrown, the SOAPFault in CXF will only throw
the "Fault occurred while processing." message rather than the original NPE
This message("Fault occurred while processing.") hides the details of the
exception and will make user hard to find the root cause of the exception.

I did some investigation and found that
in org.apache.cxf.binding.soap.interceptor.Soap11FaultOutInterceptor and
It will check fault.getMessage() :
                if (fault.getMessage() != null) {
                    if (message.get("forced.faultstring") != null) {
                    } else {

                } else {
                    writer.writeCharacters("Fault occurred while
But for NPE, the fault.getMessage() will return null instead of the
"java.lang.NullPointerException" in the getMessage() in NPE.

It is suggested to improve the getMessage in the SOAPFault to let it
include the"java.lang.NullPointerException" so that the user can get the
details of the SOAPFault. Any suggestions? Thanks.

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