namespace.put("outExchange", outExchange); NormalizedMessage out = outExchange.createMessage(); outExchange.setInMessage(out);
if (out instanceof NormalizedMessageImpl) { namespace.put("outExchange", ((NormalizedMessageImpl) out).getExchange()); }
    protected void populateNamespace(Namespace namespace, MessageExchange exchange, NormalizedMessage message) throws MessagingException {        namespace.put("componentContext", getContext());        namespace.put("deliveryChannel", getDeliveryChannel());        namespace.put("exchange", exchange);        namespace.put("inMessage", message);        namespace.put("log", getScriptLogger());        namespace.put("componentNamespace", namespace);        namespace.put("bindings", bindings);        InOnly outExchange = null;        if (isInAndOut(exchange)) {            NormalizedMessage out = exchange.createMessage();            exchange.setMessage(out, "out");            namespace.put("outMessage", out);        }        else if (!isDisableOutput()) {            outExchange = getExchangeFactory().createInOnlyExchange();            namespace.put("outExchange", outExchange);            NormalizedMessage out = outExchange.createMessage();            outExchange.setInMessage(out);            namespace.put("outMessage", out);        }    }