I'm probably missing something obvious here but I can't see it and it's my first attempt at using Spring Integration.
What I want to do is to receive an HTTP GET request, send it to a REST service and return the response.
I've got the request being handed off the service working fine.
The part that I can't get working is to return the response body - I've set the expected-response-type to java.lang.String but nothing is coming back (The response is XML)
Config below.
<bean class="org.springframework.web.servlet.handler.Sim pleUrlHandlerMapping">
<property name="mappings">
<props>
<prop key="files">httpInbound</prop>
</props>
</property>
</bean>
<int-http:inbound-gateway id="httpInbound"
reply-timeout="10000"
request-channel="httpRequestChannel"
reply-channel="httpReplyChannel"
mapped-request-headers="HTTP_REQUEST_HEADERS, X-*"
mapped-response-headers="HTTP_RESPONSE_HEADERS, X-*"
extract-reply-payload="true"
/>
<int-http:outbound-gateway id="httpOutbound"
request-channel="httpRequestChannel"
url="http://localhost:8080/myService/service/action"
charset="UTF-8"
reply-channel="httpReplyChannel"
http-method="GET"
expected-response-type="java.lang.String"
mapped-request-headers="HTTP_REQUEST_HEADERS, X-*"
mapped-response-headers="HTTP_RESPONSE_HEADERS, X-*">
</int-http:outbound-gateway>
<int:channel id="httpReplyChannel"/>


Reply With Quote