Need detail information on http outbound gateway
Hi,
I am beginner to spring integration and working on a requirement where I need to send xml file via http POST to external website and need HttpReponse code back.
For the same, I have found out that I need HttpOutboundGateway implementation. from other thread, I have got the complete attribute lists which can be used with gateway which is shown below. spring reference manual, did not describes every attribute details so I appreciate if some one guide me on it. many attributes are self explanatory but specifically, I am looking for how to use following attributes.
1. request-factory="testRequestFactory" : how can I create and use custom request factory here. sample code will be appreciated.
2. mapped-request-headers and mapped-response-headers : how to use these attributes?
3. <http:uri-variable name="foo" expression="headers.bar"/> : what is this for?
4. order="77" : what is this for?
5. I understand that response will be back in "replies" channel. but how can I get HttpResponse object from this channel? I mean, how can I read Http status code?
6. spring reference manual explains that we can use "request-mapper" attribute to specify custom OutboundRequestMapper so can some one explains by example, how to create custom OutboundRequestMapper?
<http:outbound-gateway id="fullConfig"
url="http://localhost/test2"
http-method="PUT"
request-channel="requestChannel"
request-factory="testRequestFactory"
request-timeout="1234"
message-converters="converterList"
extract-request-payload="false"
expected-response-type="java.lang.String"
mapped-request-headers="requestHeader1, requestHeader2"
mapped-response-headers="responseHeader"
reply-channel="replies"
charset="UTF-8"
order="77"
auto-startup="false">
<http:uri-variable name="foo" expression="headers.bar"/>
</http:outbound-gateway>