Reputation: 813
I try to put http:outbound-gateway into a chain, but met exceptions in runtime, may I know can I put http outbound gateway into chain
Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: The 'request-channel' attribute isn't allowed for a nested (e.g. inside a <chain/>) endpoint element: 'http:outbound-gateway'.
but when I removed attribute 'request-channel', IDE told me this is a mandatory attribute.
here is my configuration:
<int:chain input-channel="requestChannel"
output-channel="requestChannel2">
<http:outbound-gateway request-channel="requestChannel2" expected-response-type="java.lang.String"
url="http://localhost:8080/postService/postwithparm"
http-method="POST"
extract-request-payload="true">
</http:outbound-gateway>
</int:chain>
Upvotes: 1
Views: 520
Reputation: 121550
The request-channel
is an input for that Gateway. But since it is already n the chain that is already this component to wire channel adapters together and we can't effect it with our own channels.
So, the way to go without request-channel
is correct. That's just your IDE doesn't support the proper behavior.
Upvotes: 1