Add support for URL Expression for Http Outbound adapter/gateway

Details

Description

Based on the changes that are described in INT-2569 (which is actually a mitigation to avoid breaking change and not really a recommended way of doing things) we need to provide this attribute to formally support ability to provide URL dynamically
For example:
Instead of

preSend on channel 'requestChannel1', message: [Payload=http://api.pdn.coupons.com/cpr/shopping/16681/users/100829679/lists/19a3862b-779a-4a65-ba5a-2968205345ca?gwauth_token=8038e590-58b9-4deb-86fa-9638c3b94e6e&ts=1354788235&sig=1d5bca4e615ed4481922161c66571d232525de03]
Caused by: java.lang.IllegalStateException: Could not create URI object: Illegal character in scheme name at index 0: %22http://api.pdn.coupons.com/cpr/shopping/16681/users/100829679/lists/19a3862b-779a-4a65-ba5a-2968205345ca?gwauth_token=8038e590-58b9-4deb-86fa-9638c3b94e6e&ts=1354788235&sig=1d5bca4e615ed4481922161c66571d232525de03%22
at org.springframework.web.util.UriComponents.toUri(UriComponents.java:533)
at org.springframework.web.util.UriTemplate.expand(UriTemplate.java:103)
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:408)
at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:384)
at org.springframework.integration.http.outbound.HttpRequestExecutingMessageHandler.handleRequestMessage(HttpRequestExecutingMessageHandler.java:351)
... 34 more

The above example explains the scenario in case of Get call.
How do we handle when we have a Post call with a request body and a dynamic url
If i try putting both(string url , object ) in the payload it gives me an error - Cannot add 2 objects in payload.
Please suggest how do I handle Post calls

dheerja arora
added a comment - 13/Dec/12 1:21 AM The above example explains the scenario in case of Get call.
How do we handle when we have a Post call with a request body and a dynamic url
If i try putting both(string url , object ) in the payload it gives me an error - Cannot add 2 objects in payload.
Please suggest how do I handle Post calls

Even if you think there might be a bug, it's best to post in the forum first. Someone responding there would be able to let you know whether to escalate it to JIRA. In this case though, you are asking a question that can be addressed by reading the manual or posting to the forum.

Mark Fisher
added a comment - 13/Dec/12 10:27 AM Please post usage questions on the forum and not in JIRA:
http://forum.springsource.org/forumdisplay.php?42-Integration
Even if you think there might be a bug, it's best to post in the forum first. Someone responding there would be able to let you know whether to escalate it to JIRA. In this case though, you are asking a question that can be addressed by reading the manual or posting to the forum.