-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Neil Chaudhuri opened INT-1677 and commented
REST HTTP GET requests contain parameters in the path and in the query string. Currently, Spring Integration captures path parameters like id in the following example
<http:inbound-gateway id="documentByIdInboundGateway"
request-channel="documentByIdRequestChannel"
reply-channel="documentByIdReplyChannel"
name="/documents/{id}"
supported-methods="GET"/>
DEBUG [BeanNameUrlHandlerMapping.lookupHandler] Matching patterns for request [/documents/1232332] are [/documents/{id}]
DEBUG [BeanNameUrlHandlerMapping.lookupHandler] URI Template variables for request [/documents/1232332] are {id=1232332}
However, it is impossible to access these URI template variables in order to construct an outbound call from them. The is a feature request for an API to retrieve the id from above for the following outbound call for example:
<http:outbound-gateway id="documentByIdTargetAdapter"
url="http://localhost:8080/myapp/documents/{id}"
http-method="GET"
request-channel="documentByIdRequestChannel"
reply-channel="targetDocumentByIdReplyChannel"
expected-response-type="com.myapp.Document"
charset="UTF-8"
header-mapper="jsonHeaderMapper">
Of course, the outbound request could be of any kind and not just a REST call.
Incidentally, it is unclear what the current Spring Integration behavior is for query parameters. Regardless, this feature request applies to all inbound REST parameters.
Affects: 2.0 Final
Reference URL: http://forum.springsource.org/showthread.php?t=99493
Issue Links:
- Investigate possible implementation of SpringIntegrationServlet that would map its handler based on the arbitrary attribute (e.g., 'path') rather than beanName for non-MVC cases [INT-2102] #6088 Investigate possible implementation of SpringIntegrationServlet that would map its handler based on the arbitrary attribute (e.g., 'path') rather than beanName for non-MVC cases
("is depended on by") - Document using the "path" attribute with HTTP inbound adapters [INT-2443] #6422 Document using the "path" attribute with HTTP inbound adapters
2 votes, 1 watchers