How to convert camel's BeanInvocation object to message body and headers?

I use Camel Proxy to open the interface as a starting point for the route. It uses the BeanInvocation object as the body of the message. How to set message body and headers based on arguments passed to interface?

public interface test{
   public void sayHi(String firstName, String lastName);
}

I would like to create a body (firstName + "" + lastName). I would also like to know how to set one argument as the message header and the other as the body.

+3
source share
1 answer

It uses the same bean parameter binding parameter that uses regular Camel bean calls. Therefore, read the documentation about this.

http://camel.apache.org/bean-integration.html

4 " " beans Camel.

+1

Source: https://habr.com/ru/post/1757839/


All Articles