From b99504ad96d4af35ffb5193ac1446f8f3b14fde2 Mon Sep 17 00:00:00 2001 From: Mark Fisher Date: Tue, 12 Jul 2011 18:19:43 -0400 Subject: [PATCH] INT-1972 remoting outbound gateway base class now must create a new message more explicitly --- .../integration/gateway/AbstractRemotingOutboundGateway.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spring-integration-core/src/main/java/org/springframework/integration/gateway/AbstractRemotingOutboundGateway.java b/spring-integration-core/src/main/java/org/springframework/integration/gateway/AbstractRemotingOutboundGateway.java index 1efd3f5464..67fbaa6c87 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/gateway/AbstractRemotingOutboundGateway.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/gateway/AbstractRemotingOutboundGateway.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2010 the original author or authors. + * Copyright 2002-2011 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -60,7 +60,8 @@ public abstract class AbstractRemotingOutboundGateway extends AbstractReplyProdu this.getClass().getName() + " expects a Serializable payload type " + "but encountered [" + message.getPayload().getClass().getName() + "]"); } - Message requestMessage = MessageBuilder.fromMessage(message).build(); + Message requestMessage = MessageBuilder.withPayload(message.getPayload()) + .copyHeaders(message.getHeaders()).build(); try { Message reply = this.proxy.exchange(requestMessage); if (reply != null) {