From ab64b90b778470972839b2d63b68a2f51c2c5beb Mon Sep 17 00:00:00 2001 From: Mark Fisher Date: Mon, 22 Nov 2010 18:33:21 -0500 Subject: [PATCH] INT-1552 doc polishing --- docs/src/reference/docbook/http.xml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/docs/src/reference/docbook/http.xml b/docs/src/reference/docbook/http.xml index 0bcbecbc0d..8f58086fe8 100644 --- a/docs/src/reference/docbook/http.xml +++ b/docs/src/reference/docbook/http.xml @@ -164,8 +164,8 @@ By default the HTTP request will be generated using an instance of Si ]]> The uri-variable defines two attributes expression and value. You generally use - the value attribute for literal values, but if the value you are trying t o inject is dynamic and requires - access to Message data you can use SpEL expression via expression attribute. In the above configuration + the value attribute for literal values, but if the value you are trying to inject is dynamic and requires + access to Message data you can use a SpEL expression via the expression attribute. In the above configuration the getZip() method will be invoked on the payload object of the Message and the result of that method will be used as the value for URI variable named 'zipCode'. @@ -177,10 +177,11 @@ By default the HTTP request will be generated using an instance of Si
Multipart HTTP request - RestTemplate (client) and Http Inbound Gateway (server) - This example demonstrates how simple it is to send a Multipart HTTP request via Spring's RestTemplate and receive it by Spring Integration HTTP Inbound Adapter. -All we are doing is creating MultiValueMap and populating it with multi-part data. RestTemplate will take care of the rest -by converting it to MultipartHttpServletRequest   -THis particular client will send a multipart Http Request which contains the name of the company as well as the image file with company logo. + This example demonstrates how simple it is to send a Multipart HTTP request via Spring's RestTemplate and receive + it with a Spring Integration HTTP Inbound Adapter. All we are doing is creating a MultiValueMap and + populating it with multi-part data. The RestTemplate will take care of the rest (no pun intended) by + converting it to a MultipartHttpServletRequest . This particular client will send a multipart HTTP Request + which contains the name of the company as well as an image file with the company logo. -The 'httpInboundAdapter' will receive the request, convert it to a Message with a payload as LinkedMultiValueMap which -we are parsing in the 'multipartReceiver' service-activator; +The 'httpInboundAdapter' will receive the request, convert it to a Message with a payload +that is a LinkedMultiValueMap. We then are parsing that in the 'multipartReceiver' service-activator; multipartRequest){ System.out.println("### Successfully received multipart request ###"); for (String elementName : multipartRequest.keySet()) { if (elementName.equals("company")){ System.out.println("\t" + elementName + " - " + ((String[]) multipartRequest.getFirst("company"))[0]); - } else if (elementName.equals("company-logo")){ + } + else if (elementName.equals("company-logo")){ System.out.println("\t" + elementName + " - as UploadedMultipartFile: " + ((UploadedMultipartFile) multipartRequest.getFirst("company-logo")). getOriginalFilename());