You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Dan Ciarniello <dc...@cityxpress.com> on 2004/11/04 01:31:05 UTC
Turning off stacktrace problem (and solution)
I ran into a problem with not being able to stop stack traces from being
sent to the client even though "axis.development.system" was set to
false in the wsdd. The beauty of open source is that I've been able to
trace through the code and figure out what the problem was. The service
that I'm developing has an onFault handler that had the following line
of code:
SOAPFault fault =
(SOAPFault)ctx.getResponseMessage().getSOAPEnvelope().getBody().getFault();
Before this call, the response message contained the fault that my
service had thrown but after the call it contained a copy of the fault.
Unfortunately, the code that removes the stack trace from the fault
works on the original, not the copy, so the stack trace is still in the
response when the response gets sent.
By changing the above to:
Object fault_obj =
((SOAPPart)ctx.getResponseMessage().getSOAPPart()).getCurrentMessage();
which does not change the response message. I now simply check whether
fault_obj is an AxisFault or a SOAPFault and act accordingly.
Hope this helps others who have run into this problem.
Dan.
Re: Turning off stacktrace problem (and solution)
Posted by Nelson Minar <ne...@monkey.org>.
>I ran into a problem with not being able to stop stack traces from being
>sent to the client even though "axis.development.system"
Oh! Thank you for figuring this out and posting the details. This has
been bugging me for a long time in my Axis install.
I took the liberty of filing your email as an Axis bug
http://nagoya.apache.org/jira/browse/AXIS-1642