I am trying an inbound http gateway using spring integration . Below is my configuration .
<int:channel id="requestChannel" />
<int:channel id="responseChannel" />
<int-http:inbound-gateway id="inboundEmployeeSearchRequestGateway"
supported-methods="POST" request-channel="requestChannel"
reply-channel="responseChannel"
mapped-response-headers="Return-Status, Return-Status-Msg, HTTP_RESPONSE_HEADERS"
path="/services/{parama}/{paramb}/search"
reply-timeout="6000000000">
<int-http:header name="parama" expression="#pathVariables.parama" />
<int-http:header name="paramb" expression="#pathVariables.paramb" />
</int-http:inbound-gateway>
<int:service-activator id="activator"
input-channel="requestChannel" output-channel="responseChannel"
ref="execSearch" method="execute" requires-reply="true"
send-timeout="6000000000" />
My Service activator code is as follows :
@Service
public class ExecutionService {
@Autowired
private AppDao appDao;
public SQLResponse execute(Message<?> msg) throws Exception {
SQLResponse response = new SQLResponse();
Map<String,String> map = new HashMap<>();
map.put("name","test");
response.setResult(map);
return response;
}
}
But my response is getting chunked and this happens only if i consume the service using POST , whereas GET functions perfectly fine . Please help