Skip to content

Commit

Permalink
Merge pull request #1758 from KalinduGandara/master
Browse files Browse the repository at this point in the history
Fix FastXSLT with Respond mediator prepending transformed message content
  • Loading branch information
DedunuKarunarathne authored Feb 6, 2025
2 parents 0e38f20 + e3c7809 commit adebdd3
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import org.apache.commons.io.IOUtils;
import org.apache.synapse.ManagedLifecycle;
import org.apache.synapse.MessageContext;
import org.apache.synapse.SynapseConstants;
import org.apache.synapse.SynapseException;
import org.apache.synapse.SynapseLog;
import org.apache.synapse.config.Entry;
Expand Down Expand Up @@ -214,7 +215,10 @@ public boolean mediate(MessageContext context) {
fullLenthDone = true;
}

if (!fullLenthDone && Boolean.TRUE.equals(axis2MC.getProperty(PassThroughConstants.MESSAGE_BUILDER_INVOKED))) {
if (!fullLenthDone &&
(Boolean.TRUE.equals(context.getProperty(SynapseConstants.IS_SEQ_CONTENT_AWARE)) ||
Boolean.TRUE
.equals(axis2MC.getProperty(PassThroughConstants.MESSAGE_BUILDER_INVOKED)))) {
RelayUtils.buildMessage(axis2MC, false, bufferedStream);
} else if (!fullLenthDone) {
IOUtils.write(_transformedOutMessage.toByteArray(), msgContextOutStream);
Expand Down

0 comments on commit adebdd3

Please # to comment.