首页 > 解决方案 > 骆驼 cxf 肥皂和 karaf 问题

问题描述

您好我正面临这个问题 - 配置问题:无法找到 XML 模式命名空间的 Spring NamespaceHandler [ http://camel.apache.org/schema/spring] 违规资源: URL [bundle://2888.0:0/META- INF/spring/camel-context.xml] 将 bundle 部署到 karaf 时。

我的代码如下所示。

<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:cxf="http://camel.apache.org/schema/cxf"
xsi:schemaLocation="http://www.springframework.org/schema/beans        
http://www.springframework.org/schema/beans/spring-beans.xsd               
http://camel.apache.org/schema/spring        
http://camel.apache.org/schema/spring/camel-spring.xsd       
http://www.springframework.org/schema/context            
http://www.springframework.org/schema/context/spring-context.xsd
http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd">

<camelContext id="SOAPSERVICE" xmlns="http://camel.apache.org/schema/spring">
   <routeBuilder id="soapRouter" ref="soapRoute"/>
</camelContext>
<bean class="com.example.router.SoapRouter" id="soapRoute"/>

 <!-- setting up a Camel CXF web-service -->
 <cxf:cxfEndpoint id="exampleServiceEndPoint"
               address="http://localhost:9000/example/"
                  wsdlURL="http://localhost:9000/example?wsdl"
               serviceClass="com.example.ExampleServiceEndpoint"/>

标签: springapache-camel

解决方案


如果您对 Camel > 3.8 有此问题,请添加camel-spring-xml. 使用 spring xml dsl 已被拆分


推荐阅读