我的 Camel 路由器:
<cxf:cxfEndpoint id="chdEndpoint"
address="http://0.0.0.0:8080/chd-esb/callService" endpointName="s:RealServerImplPort"
serviceName="s:RealServerImplService" wsdlURL="wsdl/RealServer.wsdl"
xmlns:s="http://server.example.com/" />
<route id="chd-webservice">
<from uri="cxf:bean:chdEndpoint?dataFormat=MESSAGE" />
<log message="get client call webservice!" />
<to ref="callChdRealWebService" />
<log message="get real webservice back" />
</route>
我在 karaf 中部署了我的 Camel 路由器。 我想知道客户端是否调用webservice,http请求首先到jetty,jetty将请求发送到camel,然后camel使用cxf调用真正的webservice
最佳答案
您使用 Apache CXF(例如 cxfEndpoint)在 Karaf 服务器上发布 Web 服务。当您这样做时,Apache CXF 使用基于 Jetty 的 Apache Karaf 的 HTTP 服务。所以归根结底,使用的是 Jetty。
Apache Karaf 有一个 etc/jetty.xml 配置文件,在其中配置 Jetty。
您可以在 Karaf 网站上找到有关 OSGi HTTP 服务和 Jetty 的一些详细信息,例如:http://karaf.apache.org/manual/latest-2.3.x/users-guide/http.html
关于java - IS Camel 从 jetty 获取 http 请求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18606783/