1
我正在嘗試獲取在Servicemix 4上運行的CXF端點。我創建了一個帶有CXF端點的Spring原型,併成功地將它與Maven一起安裝。其運行的OSGi:安裝MVN:它安裝到ServiceMix的,但日誌顯示:Servicemix部署中沒有對cxfEndpoint的聲明
Application context refresh failed (OsgiBundleXmlApplicationContext(bundle=springdm,
config=osgibundle:/META-INF/spring/*.xml))
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 21 in XML document
from URL [bundle://218.0:0/META-INF/spring/camel-context.xml] is invalid; nested exception is
org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no
declaration can be found for element 'cxf:cxfEndpoint'
我所建的這條路線只駱駝之前在我的context.xml文件如下:
<beans ...
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.xsd
http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-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
http://cxf.apache.org/tranposrts/camel http://cxf.apache.org/tranposrts/camel.xsd">
<import resource="classpath:META-INF/cxf/cxf.xml" />
<cxf:cxfEndpoint id="wspoc"
address="http://localhost:8181/ws/ping"
serviceClass="net.ja.smx.springdm.PongImpl" />
<camelContext xmlns="http://camel.apache.org/schema/spring">
<route>
<from uri="cxf:bean:wspoc"/>
<to uri="activemq:helloQ" />
</route>
</camelContext>
這是一個工作的駱駝上下文文件的克隆,但我不明白爲什麼ServiceMix在啓動時拋出錯誤。唯一的區別是,pom文件不使用CXF作爲依賴項,但它在我從在線示例中獲取的部分中。
我會很感激任何缺少導入或更正上下文文件或任何我應該檢查的指針。
非常感謝。