Hello!
 
Thanks Martin, I tried a couple of configs, but unfortunately it doesn't seem 
to work.
 
<parameter name="sendStacktraceDetailsWithFaults">true</parameter>    --> 
getDetail() returns huge stacktrace
<parameter name="sendStacktraceDetailsWithFaults">false</parameter>   --> 
getDetail() returns null
 
I have also tried: 
<parameter name="DrillDownToRootCauseForFaultReason">false</parameter> and
<parameter name="DrillDownToRootCauseForFaultReason">true</parameter> but it 
has no effect in this case.
 
 
So the question is still:
Could it be possible to change the fault handling code a little bit to throw an 
AxisFault with a CustomException only in the details field? Like: The 
AxisFault.getDetails() returns something like <CustomException>custom 
message... </CustomException>
 
/Pär
 
 
 
 


From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: Re: AxisFault, CustomException and 
code first approachDate: Thu, 30 Nov 2000 10:30:03 -0500



Hello Par
I would first try to attenuate the axis2.xml parameter  StackTrace e.g.
    <parameter name="sendStacktraceDetailsWithFaults">false</parameter>Martin--

----- Original Message ----- 
From: Pär Malmqvist 
To: [email protected] 
Sent: Friday, November 30, 2007 9:49 AM
Subject: AxisFault, CustomException and code first approach
Hi!When creating a web service using existing business logic with "code first" 
approach I dont think custom exceptions are handled the way it should. (Axis2 
1.3)The custom exception appears on the client side in the AxisFault details 
field within <exception><exception> -tags together with a HUGE stack trace. I 
have checked the source code for RPCMesssageReceiver and specially the section 
that handles the AxisFault:} catch (InvocationTargetException e) {            
String msg = null;            Throwable cause = e.getCause();            if 
(cause != null) {                msg = cause.getMessage();            }         
   if (msg == null) {                msg = "Exception occurred while trying to 
invoke service method " +                        method.getName();            } 
           if (cause instanceof AxisFault) {                log.debug(msg, 
cause);                throw (AxisFault)cause;            }            
log.error(msg, e);            throw new AxisFault(msg, e);        } 
catch(RuntimeException e) {            throw AxisFault.makeFault(e);        } 
catch (Exception e) {            String msg = "Exception occurred while trying 
to invoke service method " +                    method.getName();            
log.error(msg, e);            throw AxisFault.makeFault(e);        }}Could it 
be possible to change this code a little bit to throw an AxisFault with a 
CustomException only in the details field? Like: The AxisFault.getDetails() 
returns something like <CustomException>custom message... </CustomException>It 
would be much easier to handle the exception on the client side!What do you 
gurus think? /Pär      

Invite your mail contacts to join your friends list with Windows Live Spaces. 
It's easy! Try it! 
_________________________________________________________________
Connect to the next generation of MSN Messenger 
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline

Reply via email to