How can I create http outbound-gateway with JAVA config in Spring integration? -
i have following http outbound gateway. how can configuration java config or spring dsl?
<int-http:outbound-gateway id="test" url="http://localhost:8080/" http-method="post" charset="utf-8" header-mapper="soapheadermapper" request-factory="requestfactory" request-channel="inputchannel"/>
@bean public integrationflow httpout() { return integrationflows.from("inputchannel") .handle(http.outboundgateway("http://localhost:8080/") .charset("utf-8") .httpmethod(httpmethod.post) .headermapper(soapheadermapper()) .requestfactory(requestfactory()), e -> e.id("test")) .get(); }
or
@serviceactivator(inputchannel="inputchannel") @bean(name="test") public messagehandler httpout() { httprequestexecutingmessagehandler handler = new ... ... return handler; }
Comments
Post a Comment