Oct 19th, 2010, 01:02 PM
Need detail information on http outbound gateway
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:uri-variable name="foo" expression="headers.bar"/>
Oct 21st, 2010, 10:47 AM
Have you looked at Spring Integration samples?
There is a couple of samples that shows HttpOutboundGateway.
Look at 'travel' sample and 'http-multipart' and let us know if you need more info.
To get samples check out this blog: http://blog.springsource.com/2010/09...ation-samples/
Oct 27th, 2010, 02:32 PM
and sorry for late reply. I tried and tested multipart sample and got fair idea about HttpOutboundGateway. but still documents has lack of information like how to build custom request mapper, details of each attributes associated with this gateway, how to tie custom executor etc. Apology in advance if it is there and I did not found out yet.
Another query now I am facing is to get the HttpResponse back and to know status code. Can you tell me please how can I get Http status code once request is sent through http outbound gateway?
Tags for this Thread