FUSE(servicemix)ESB中的camel cxf路由的IllegalStateException

我尝试在FUSE(Ver.4.3.0)ESB / OSGi容器中设置一个camel(Ver.2.4.0)路由。 它应该是一个简单的cxf代理,用于将WebService调用从“代理”地址路由到实际服务。 我读了几个文档: CXF代理示例 camel cxf组件 并设置以下弹簧配置:
<?xml version="1.0" encoding="UTF-8"?>
<beans
    xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:camel="http://camel.apache.org/schema/spring"
    xmlns:osgi="http://www.springframework.org/schema/osgi"
    xmlns:cxf="http://camel.apache.org/schema/cxf"
    xsi:schemaLocation="
        http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
        http://www.springframework.org/schema/osgi
        http://www.springframework.org/schema/osgi/spring-osgi.xsd
        http://camel.apache.org/schema/osgi
        http://camel.apache.org/schema/osgi/camel-osgi.xsd
        http://camel.apache.org/schema/spring
        http://camel.apache.org/schema/spring/camel-spring.xsd
        http://camel.apache.org/schema/cxf
        http://camel.apache.org/schema/cxf/camel-cxf.xsd">

    <import
        resource="classpath:META-INF/cxf/cxf.xml" />
    <import
        resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
    <import
        resource="classpath:META-INF/cxf/cxf-extension-http.xml" />
    <import
        resource="classpath:META-INF/cxf/osgi/cxf-extension-osgi.xml" />

    <!-- the proxy service -->
    <cxf:cxfEndpoint
        id="myServiceProxy"
        address="http://localhost:9003/cxf/myService"
        serviceClass="foo.bar.iface.MyServiceInterface" />

    <!-- my real existing cxf soap service -->
    <cxf:cxfEndpoint
        id="myService"
        address="http://foo.bar/services/myService"
        wsdlURL="http://foo.bar/services/myService?wsdl"
        serviceClass="foo.bar.iface.MyServiceInterface"
        serviceName="s:MyService"
        endpointName="s:MyServiceEndpoint"
        xmlns:s="http://foo.bar/iface/" />

    <!-- route -->
    <camel:camelContext>
        <camel:route>
            <camel:from
                uri="cxf:bean:myServiceProxy" />
            <camel:to
                uri="cxf:bean:myService" />
        </camel:route>
    </camel:camelContext>

</beans>
尝试在FUSE中启动捆绑包会导致此异常
karaf@root> Exception in thread "SpringOsgiExtenderThread-22" org.apache.camel.RuntimeCamelException: java.lang.IllegalStateException: Endpoint address should be a relative URI wrt to the servlet address (use '/xxx' for example)
        at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1126)
        at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:103)
        at org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:231)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
我不知道出了什么问题。我怀疑我的端点地址是错误的,我不知道我的servlet地址是什么(没有cxf:cxfEndoint servelt地址属性)。 任何帮助引导我朝着正确的方向解决这个问题将不胜感激。 谢谢   克劳斯     
已邀请:
我终于发现了什么是错的。 代替
<!-- the proxy service -->
<cxf:cxfEndpoint
    id="myServiceProxy"
    address="http://localhost:9003/cxf/myService"
    serviceClass="foo.bar.iface.MyServiceInterface" />
它一定要是
<!-- the proxy service -->
<cxf:cxfEndpoint
    id="myServiceProxy"
    address="/myService"
    serviceClass="foo.bar.iface.MyServiceInterface" />
由于第一种方法在FUSE外部运行良好的驼峰项目(在这种情况下,http服务器将开始提供服务),它必须是FUSE内的相对地址。 在FUSE内部,将使用运行在(localhost:8181)上的嵌入式HTTP服务器,服务URL将扩展到
http://localhost:8181/cxf/myService
。     

要回复问题请先登录注册