骆驼http端点动态形成网址 [英] camel http endpoint forming url dynamically
本文介绍了骆驼http端点动态形成网址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正试图使用
{
from(direct:a)。(someUrl ).processor(new Processor(){
@Override
public void process(Exchange arg0)throws Exception
{
// do something
}
});
其中someUrl的类型为http://xyz.com/{id}?test=<value1>&test1=<value2>
}
,此网址将根据路由的每个请求发生更改。
我已经尝试过了将参数作为标题传递,并使用标题(test)尝试访问路由,并使用$ {in.header.test}两者似乎都不起作用。
<任何建议都将非常有帮助。
解决方案
请参阅关于骆驼动态到端点的常见问题: http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
Guys I am trying to use
{
from("direct:a").to (someUrl).processor(new Processor(){
@Override
public void process(Exchange arg0) throws Exception
{
// do something
}
});
where someUrl is of the type http://xyz.com/{id}?test=<value1>&test1=<value2>
}
and this url will change on every request to the route.
What i have already tried. Passing params as headers and try to access in the route using the header("test") and using ${in.header.test} both doesn't seem to work.
any suggestions will be greatly helpful.
解决方案
See this FAQ about dynamic to endpoints in Camel: http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
这篇关于骆驼http端点动态形成网址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文