forked from membrane/api-gateway
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproxies.xml
More file actions
59 lines (49 loc) · 1.71 KB
/
proxies.xml
File metadata and controls
59 lines (49 loc) · 1.71 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<spring:beans xmlns="http://membrane-soa.org/proxies/1/"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
http://membrane-soa.org/proxies/1/ http://membrane-soa.org/schemas/proxies-1.xsd">
<router>
<!--
Simple text template with a variable
-->
<api port="2000">
<path>/text</path>
<request>
<template contentType="text/plain">Hello ${params.name}!</template>
</request>
<return/> <!-- To send messages to backend use target below instead of return -->
<!-- <target host="YourBackendHost" port="YourBackendPort"/>-->
</api>
<!--
Shows variable usage
-->
<api port="2000">
<path>/variables</path>
<request>
<!-- CDATA section to allow use of < and > characters -->
<template contentType="text/plain">
<![CDATA[
Header:
<% for(h in header.allHeaderFields) { %>
<%= h.headerName %> : <%= h.value %>
<% } %>
Exchange: <%= exc %>
Flow: <%= flow %>
Message.version: <%= message.version %>
Body: <%= message.body %>
Exchange Properties:
<% for(p in props) { %>
Key: <%= p.key %> : <%= p.value %>
<% } %>
Query Params:
<% for(p in params) { %>
<%= p.key %> : <%= p.value %>
<% } %>
]]>
</template>
</request>
<return/>
</api>
</router>
</spring:beans>