Hi,
I am using Spring 3.0.6 and Spring Itegration 2.1.0.M3. I am forwarding a HTTP inbound request to a outbound gateway.
I have 2 gateways for this, one inbound and one outbound.
Following is the configuration.
I want to transfer request parms from inbound gateway to outbound gateway, how to do that, because I am not getting them in business layer if I call that from rest.Code:<int-http:inbound-gateway request-channel="getLogsByVendorInChannel" name="/fetchAllLogs/{vendor}" path="/fetchAllLogs/{vendor}" mapped-request-headers="accept-charset:utf-8" supported-methods="GET" reply-channel="getLogsByVendorOutChannel"> <int-http:header name="vendor" expression="#pathVariables.vendor"/> </int-http:inbound-gateway> <int-http:outbound-gateway url="http://localhost:8080/BusinessSampleProject/fetchAllLogs/{vendor}" request-channel="getLogsByVendorInChannel" > <int-http:uri-variable name="vendor" expression="headers.vendor"/> </int-http:outbound-gateway>
Following is the configuration for the business component.
Code:<int:channel id="inCh"></int:channel> <int:channel id="outCh"></int:channel> <int:channel id="transformedCh"></int:channel> <int-http:inbound-gateway request-channel="inCh" name="/fetchAllLogs/{vendor}" path="/fetchAllLogs/{vendor}" mapped-request-headers="accept-charset:utf-8" reply-channel="transformedCh"> <int-http:header name="vendor" expression="#pathVariables.vendor"/> <int-http:header name="reqParams" expression="#requestParams"/> </int-http:inbound-gateway> <int:object-to-json-transformer input-channel="outCh" output-channel="transformedCh"></int:object-to-json-transformer> <int:service-activator input-channel="inCh" output-channel="outCh" expression="@auditLogService.fetchAllLogsByVendor(headers.vendor, headers.reqParams)"> </int:service-activator>
Thanks in advance.
Amit


Reply With Quote