Hi,
yes, marking a fault as a response by default sounds also reasonable to me. If there are really cases where this is not what you want, you can simply leave the code as it is, but just initialize the markAsResponse to true by default so the user would only need to configure something if he wants to change the default to not send the fault as a response. Removing the To header programmatically here if no ReplyTo exists sounds like a good idea. This would further reduce the need of configuration. Good ideas Asankha, I'm also interested whether Ruwan has some cases in mind, where this would not be a desired behaviour. Regards, Eric ________________________________ From: Asankha C. Perera [mailto:[EMAIL PROTECTED] Sent: Friday, August 01, 2008 8:12 AM To: dev@synapse.apache.org Subject: Re: svn commit: r672650 - in /synapse/trunk/java/modules/core/src: main/java/org/apache/synapse/config/xml/ main/java/org/apache/synapse/mediators/transform/ test/java/org/apache/synapse/config/xml/ Ruwan I think by default, we should mark a fault as a response? Any reason to not do this? Also for the below code, shall we check if a ReplyTo exists, and else remove the 'To' header like we now do in config? thanks asankha [EMAIL PROTECTED] wrote: Author: ruwan Date: Sun Jun 29 10:33:49 2008 New Revision: 672650 Fixing the issue SYNAPSE-367 now the <makeFault> will optionally mark the message as a response when the response attribute value is set to true ======================================================================== ====== --- synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediato rs/transform/FaultMediator.java (original) +++ synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/mediato rs/transform/FaultMediator.java Sun Jun 29 10:33:49 2008 @@ -114,23 +118,31 @@ ... + // if the message has to be marked as a response mark it as response + if (markAsResponse) { + synCtx.setResponse(true); + synCtx.setTo(synCtx.getReplyTo()); + } + + return true; -- Asankha C. Perera WSO2 - http://wso2.org http://esbmagic.blogspot.com