【发布时间】:2015-01-22 16:42:52
【问题描述】:
我知道我可以使用蓝图语法在独立的 xml 文件中定义 Camel 路由。如果我将其中一个文件移动到 ServiceMix 的“deploy”文件夹中,它会自动成为一个 OSGI 包。我的问题是,我可以为这个新捆绑包设置一个端点,可以从外部访问吗?
我想做这样的事情:
blue_route1.xml
<blueprint>
<camelContext>
<route>
<from uri="http:my_servicemix:8181/blue_route1_endpoint" />
<to uri="jetty:http://server1" />
</route>
</camelContext>
</blueprint>
blue_route1 部署后成为 OSGI 包,但我应该在哪里定义 "blue_route1_endpoint" ?可行吗?
[更新]
夏天,我希望外部 WS 能够向 blue_route1_endpoint 发送消息,其中 blue_route1 捆绑包将根据 Camel 路由重定向消息,而无需创建要在 ServiceMix 中部署的新 WS“Blue_route1”
______________________
| ____________ |
external-->(blue_route1_endpoint)==|==-->|blue_route1|--|-->(http://server1)
WS | |___________| |
|____________________|
ServiceMix
【问题讨论】:
-
从外部访问是什么意思,是指使用HTTP吗?然后代替 http 使用 jetty 或 servlet 组件。
-
我希望外部 WebService 能够向其发送 SOAP 消息。是否有可能,或者我需要创建一个“假”WS 来部署在 ServiceMix 中,以便使用骆驼路由重定向消息?我更新了问题,试图更清楚
标签: apache-camel blueprint-osgi apache-servicemix