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