/
HttpProxyScenarioTests-context.xml
41 lines (31 loc) · 1.81 KB
/
HttpProxyScenarioTests-context.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?xml version="1.0" encoding="UTF-8"?>
<beans:beans
xmlns="http://www.springframework.org/schema/integration/http"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:int="http://www.springframework.org/schema/integration"
xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/integration/http https://www.springframework.org/schema/integration/http/spring-integration-http.xsd
http://www.springframework.org/schema/integration https://www.springframework.org/schema/integration/spring-integration.xsd">
<inbound-gateway path="/test" request-channel="testChannel"
payload-expression="T(org.springframework.web.context.request.RequestContextHolder).requestAttributes.request.queryString"/>
<int:publish-subscribe-channel id="testChannel"/>
<outbound-gateway id="proxyGateway" request-channel="testChannel"
url-expression="'http://testServer/test?' + payload"/>
<int:bridge input-channel="testChannel" output-channel="checkHeadersChannel"/>
<int:channel id="checkHeadersChannel">
<int:queue/>
</int:channel>
<inbound-gateway path="/testmp" request-channel="testChannelmp"
message-converters="formHttpMessageConverter"/>
<beans:bean id="formHttpMessageConverter"
class="org.springframework.integration.http.converter.MultipartAwareFormHttpMessageConverter">
<beans:property name="multipartFileReader">
<beans:bean class="org.springframework.integration.http.multipart.SimpleMultipartFileReader"/>
</beans:property>
</beans:bean>
<int:channel id="testChannelmp"/>
<outbound-gateway id="proxyGatewaymp" request-channel="testChannelmp"
http-method="POST"
url="http://testServer/testmp"/>
</beans:beans>