I’m currently receiving an object on an integration channel that is something like:
public class LargeObject {
private final String name;
private final Integer id;
}
I want to take the name from it, wrap it in my own object and send it to another channel.
So generally I want to transform the message payload in a way similar to <integration:json-to-object-transformer>.
I could just do it with a <integration:service-activator>, but I was wandering if there is component specifically dedicated for the job ?
Thanks,
The proper component for this is a
Assuming you have a constructor on your new object and a getName() method on your LargeObject, you can use a simple transformer with an expression…
If you need more sophistication, simply make a POJO with this method…
and use…