In Spring Integration, I have message like following :
{
"name":"House",
"attributeIds": [1,3,5]
}
I need to enrich/transform this message using some Rest Service, which will give me the attribute values.
For example http://restservice.com/attributes?id=1,3,5
will answer me with
{"attributes": [
{"id": 1, "value":"Waterproof"},
{"id": 3, "value":"SoundProof"},
{"id": 5, "value":"Concrete"}
]}
And the final object should look like this:
{
"name":"House",
"attributes": [
{"id": 1, "value":"Waterproof"},
{"id": 3, "value":"SoundProof"},
{"id": 5, "value":"Concrete"}
]
}
How can this be achieved?
Should it be like this? https://www.youtube.com/watch?time_continue=273&v=DHPsWDgEUXg
InboundAdapter -> Enricher -> Request Channel -> Service Activator -> Enricher -> Outbound Adapter?