INT-1972 remoting outbound gateway base class now must create a new message more explicitly

This commit is contained in:
Mark Fisher
2011-07-12 18:19:43 -04:00
parent 4866d242be
commit b99504ad96

View File

@@ -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) {