如何将我BeanInvocation对象骆驼到邮件正文和标题? [英] How do I convert my BeanInvocation object in camel to a message body and headers?

查看:220
本文介绍了如何将我BeanInvocation对象骆驼到邮件正文和标题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用骆驼代理来公开接口作为起始点路线。
它采用了BeanInvocation对象作为邮件正文。如何设置邮件正文和标题的基础上传递到接口的参数?

I'm using Camel Proxy to expose an interface as a starting point for a route. It uses a BeanInvocation object as the message body. How do I set the message body and headers based on the arguments passed to the interface?

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

我想使身体(名字++ lastName的)。
我也想知道如何设置一个参数作为对消息的头,另一个为身体。

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

推荐答案

它使用同一个bean参数绑定的东西,经常骆驼豆调用使用。所以检查出文档关于本

It uses the same bean parameter binding stuff that regular Camel bean invocations uses. So check out the documentation about this

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

骆驼在行动第4章涵盖了所有有关使用豆骆驼。

Camel in Action chapter 4 covers all about using beans with Camel.

这篇关于如何将我BeanInvocation对象骆驼到邮件正文和标题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆