i am working with a si-http:outbound-gateway and si-http:inbound-gateway pair, and i am trying to pass primitives in

MessageHeaders across that boundary.

basically, i was looking for the default behavior exhibited when using the si-jms analogy outbound/inbound gateways.

my test client looks like:

Code:
    Message<?> message = MessageBuilder.withPayload(m_request).setHeader(KEY_1, VAL_1).build();
    message = new MessagingTemplate(m_channel).sendAndReceive(message);
my inbound definition looks like:

Code:
 <http:inbound-gateway id="inboundGateway" request-channel="request.input" convert-exceptions="true"
    request-payload-type="java.lang.String" />

  <si:service-activator input-channel="request.input">
    <bean class="com.aetna.framework.integration.test.RequestProcessor" p:name="processor-1" />
  </si:service-activator>
the method signature of the RequestProcessor referred to in the service-activator above looks like:

Code:
  public Message<?> invoke(Message<?> message) {...}
when my outbound definition looks like (extract-request-payload="true"):

Code:
  <http:outbound-gateway id="http" request-channel="http.output" url="${url}"
    extract-request-payload="true" charset="UTF-8" request-timeout="1000" expected-response-type="java.lang.String" />
the Message received on the inbound side looks like (KEY_1 header not present):

Code:
[Payload=<request/>][Headers={timestamp=1290868776859, id=146c3e71-f6aa-4f6a-84ad-062dc917d722, errorChannel=org.springframework.integration.core.MessagingTemplate$TemporaryReplyChannel@148e798, http_requestMethod=POST, replyChannel=org.springframework.integration.core.MessagingTemplate$TemporaryReplyChannel@148e798, http_requestUrl=http://localhost:8080/aefw-inbound-gateway-webapp/si}]
when my outbound definition looks like (extract-request-payload="false"):

Code:
  <http:outbound-gateway id="http" request-channel="http.output" url="${url}"
    extract-request-payload="false" charset="UTF-8" request-timeout="1000" expected-response-type="java.lang.String" />
the Message received on the inbound side looks like (KEY_1 header present, but...):

Code:
[Payload=[Payload=<request/>][Headers={id=4b2cf18c-a487-4f6f-ae0e-262934d4ae96, timestamp=1290867389625, key-1=val-1}]][Headers={timestamp=1290867389765, id=20afa961-1934-46c1-813e-3cdac762269d, errorChannel=org.springframework.integration.core.MessagingTemplate$TemporaryReplyChannel@1b5c22f, http_requestMethod=POST, replyChannel=org.springframework.integration.core.MessagingTemplate$TemporaryReplyChannel@1b5c22f, http_requestUrl=http://localhost:8080/aefw-inbound-gateway-webapp/si}]
the Message received contains a *nested* Message as the payload with KEY_1 present (?!).

i could probably work with this, but over on the outbound side i see the following INFO messages:

Code:
[inbound-gateway-test] 2010-11-27 10:24:52,984 INFO [org.springframework.integration.MessageHeaders] - removing non-serializable header: errorChannel
[inbound-gateway-test] 2010-11-27 10:24:52,984 INFO [org.springframework.integration.MessageHeaders] - removing non-serializable header: replyChannel
and then the following exception:

Code:
org.springframework.integration.support.channel.ChannelResolutionException: no output-channel or replyChannel header available
	at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.sendReplyMessage(AbstractReplyProducingMessageHandler.java:166)
	at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.produceReply(AbstractReplyProducingMessageHandler.java:125)
	at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleResult(AbstractReplyProducingMessageHandler.java:119)
	at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:101)
	at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:78)
	at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:110)
	at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:97)
	at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:44)
	at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:157)
	at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:128)
	at org.springframework.integration.core.MessagingTemplate.doSend(MessagingTemplate.java:288)
	at org.springframework.integration.core.MessagingTemplate.doSendAndReceive(MessagingTemplate.java:318)
	at org.springframework.integration.core.MessagingTemplate.sendAndReceive(MessagingTemplate.java:239)
	at org.springframework.integration.core.MessagingTemplate.sendAndReceive(MessagingTemplate.java:235)
	at com.aetna.framework.integration.test.HttpInboundGatewayIntegrationTest.test_1(HttpInboundGatewayIntegrationTest.java:57)
can any one provide guidance for an appropriate setup for this type of interaction?

thanks,
tony.