From c8a3ee70586c556cc10ec23be4b8b7110c173de2 Mon Sep 17 00:00:00 2001 From: Mark Fisher Date: Wed, 25 Mar 2009 12:33:53 +0000 Subject: [PATCH] minor updates --- spring-integration-reference/src/http.xml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/spring-integration-reference/src/http.xml b/spring-integration-reference/src/http.xml index 0bb6109de4..e092aa71ea 100644 --- a/spring-integration-reference/src/http.xml +++ b/spring-integration-reference/src/http.xml @@ -6,7 +6,7 @@
Introduction - The HTTP support allows for the making of HTTP requests and the processing of inbound Http requests. Because interaction HTTP is always synchronous, even if all that is returned is a 200 status code the Http support consists of two gateway implementations + The HTTP support allows for the making of HTTP requests and the processing of inbound Http requests. Because interaction over HTTP is always synchronous, even if all that is returned is a 200 status code the Http support consists of two gateway implementations HttpInboundEndpoint and HttpOutboundEndpoint.
@@ -17,14 +17,14 @@ To receive messages over http you need to use an HttpInboundEndpoint. In common with the HttpInvoker support the Http Inbound Gateway needs to be deployed within a servlet container. The easiest way to do this is to provide a servlet definition in web.xml, see - for further details. Below is an example bean defintion for a simple HttpInboundEndpoint + for further details. Below is an example bean definition for a simple HttpInboundEndpoint ]]> The HttpInboundEndpoint accepts an instance of InboundRequestMapper which allows customisation of the mapping from HttpServletRequest to Message. If none is - provided the an instance of DefaultInboundRequestMapper will be used. This encapsualtes a simple strategy, which for + provided the an instance of DefaultInboundRequestMapper will be used. This encapsulates a simple strategy, which for example will create a String message for a POST request where the content type starts with "text", see the Javadoc for full details. @@ -33,7 +33,7 @@ simply acknowledge that the request was received by sending a 200 status code back. It is possible to customise this response by providing an implementation of the Spring MVC View which will be invoked with the created Message. In the case that the gateway should expect a reply to the Message then setting the expectReply flag will cause - the gateway to wait for a reponse Message before creating a Http response. Below is an example of a gateway + the gateway to wait for a response Message before creating an Http response. Below is an example of a gateway configured to use a custom view and to wait for a response. It also shows how to customise the Http methods accepted by the gateway, which are POST and GET by default. @@ -49,8 +49,9 @@ ]]> - - + The message created from the request will be available in the Model map. The key that is used + for that map entry by default is 'requestMessage', but this can be overridden by setting the + 'requestKey' property on the endpoint's configuration. @@ -64,7 +65,7 @@ ]]> This bean definition will execute Http requests by first converting the message to the Http request using an instance of DefaultOutboundRequestMapper. This will expect to find the request URL in the message header under - the key HttpHeaders.REQUEST_URL. It is also possilbe to set a default target URL as a constructor argument + the key HttpHeaders.REQUEST_URL. It is also possible to set a default target URL as a constructor argument along with other options as shown below. @@ -105,6 +106,10 @@ By default the Http request will be made using an instance of SimpleH request-executor="executor" request-timeout="1234" reply-channel="replies"/>]]> + If you want to provide a custom OutboundRequestMapper, then a reference may be supplied to the + 'request-mapper' attribute. In that case however you will not be allowed to set the default URL, + charset, and 'extract-request-payload' properties since those are all properties of the default + mapper (see the JavaDoc for DefaultOutboundRequestMapper for more information).