Using spring integration as a mediator -
i try use spring integration simple mediator. have webapp residing on intranet can not accessed outside. want expose app through mediator in dmz. means url:s http://gateway/theapp/* should forwarded http://internal/theapp/*. simple in theory seems component handling outgoing http-reuests in spring integration (httprequestexecutingmessagehandler) needs explicut uri, i.e no wildcard matching. can achieved spring integration?
the inbound gateway puts url header; can use expression on outbound gateway...
url-expression="headers['http_requesturl'].replace('gateway', 'internal')"
if using java @configuration
, can use constructor takes expression
...
expression expression = new spelexpressionparser().parseexpression( "headers['http_requesturl'].replace('gateway', 'internal')");
this test case similar grabbing query string , appends new url.
in case, puts query string in payload; added header instead (e.g. post), using <int:header/>
child element.
Comments
Post a Comment