From bd0cd1ff036cf6b883c26fe13e4e96f4a1570133 Mon Sep 17 00:00:00 2001 From: Oleg Zhurakousky Date: Mon, 3 May 2010 22:13:19 +0000 Subject: [PATCH] INT-1111, documented the change --- spring-integration-reference/src/gateway.xml | 22 ++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/spring-integration-reference/src/gateway.xml b/spring-integration-reference/src/gateway.xml index c576256059..54e0df16b0 100644 --- a/spring-integration-reference/src/gateway.xml +++ b/spring-integration-reference/src/gateway.xml @@ -76,6 +76,28 @@ ]]> + + You can also provide individual headers per method invocation via XML. + This could be very useful if headers you want to set are static in nature and you don't want + to embed them in the gateway's method signature via @Header annotation. + For example; in the Loan Broker example we want to influence how aggregation of the Loan quotes + will be done based on what type of request was initiated (single quote or all quotes). Determining the + type of the request by evaluating what gateway's method was invoked, although possible would + violate the separation of concerns paradigm (method is a java artifact),  but expressing your + intention (meta information) via Message headers is natural to Messaging architecture. + + + + + + + + +]]> + In the above case you can clearly see how a different header value will be set for the 'RESPONSE_TYPE' + header based on the gateway's method. + \ No newline at end of file