我想使用Apache Camel
创建一个应用程序。我在route
文件中写了xml
。但是Karaf container
无法识别我为{{{{}}写的包1}}。这是我的beans
和xml
文件:
pom.xml
当我<?xml version="1.0" encoding="UTF-8"?>
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
license agreements. See the NOTICE file distributed with this work for additional
information regarding copyright ownership. The ASF licenses this file to
You under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of
the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
by applicable law or agreed to in writing, software distributed under the
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
OF ANY KIND, either express or implied. See the License for the specific
language governing permissions and limitations under the License. -->
<!-- START SNIPPET: e1 -->
<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:cxf="http://camel.apache.org/schema/cxf" xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.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">
<bean id="aysProcessor" class="com.bedas.ima.AysProcessor" />
<bean id="executor" class="java.util.concurrent.Executors"
factory-method="newFixedThreadPool">
<constructor-arg index="0" value="16" />
</bean>
<bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent">
<property name="brokerURL" value="tcp://localhost:61616" />
<property name="userName" value="akin" />
<property name="password" value="akin123" />
</bean>
<!-- <import resource="classpath:META-INF/cxf/cxf.xml" /> -->
<!-- this is the CXF web service we use as the front end -->
<cxf:cxfEndpoint id="ima-okuma"
address="http://localhost:8168/sep/services/cxf/imaOkumaCxfService"
serviceName="s:ImaOkumaServiceImplService" wsdlURL="META-INF/wsdl/imaokuma.wsdl"
xmlns:s="http://service.cxf.ws.sep.bedas.com/" />
<cxf:cxfEndpoint id="ays-service"
address="http://localhost:8080/ays/services/begisService"
serviceName="s:BegisServiceImplService" wsdlURL="META-INF/wsdl/aysBegis.wsdl"
serviceClass="com.bedas.ays.ws.service.BegisService"
xmlns:s="http://service.ws.ays.bedas.com/" />
<!-- <bean id="myNameStrategy" class="org.apache.camel.dataformat.soap.name.ServiceInterfaceStrategy"> -->
<!-- <constructor-arg value="com.bedas.sep.ws.cxf.service.ImaOkumaCxfService"/> -->
<!-- <constructor-arg value="true"/> -->
<!-- </bean> -->
<!-- <bean id="enrichBean" class="com.bedas.ays.ws.service.EnrichBean"/> -->
<!-- this is the Camel route which proxies the real web service and forwards
SOAP requests to it -->
<!-- <route errorHandlerRef="dlc" id="imaRoute2"> --><!-- <from uri="activemq:queue:imaokumaq?disableTimeToLive=true"/> --><!-- <to uri="http://10.212.80.138:8080/sep/services/cxf/imaOkumaCxfService"/> --><!-- </route> -->
<camelContext trace="false" errorHandlerRef="defaultEH" id="ImaOkuma" xmlns="http://camel.apache.org/schema/spring">
<errorHandler type="DefaultErrorHandler" id="defaultEH">
<redeliveryPolicy maximumRedeliveries="0" retryAttemptedLogLevel="WARN"/>
</errorHandler>
<errorHandler type="DeadLetterChannel" deadLetterUri="activemq:queue:imaOkumaERROR" useOriginalMessage="true" id="dlc">
<redeliveryPolicy maximumRedeliveries="0"/>
</errorHandler>
<dataFormats>
<jaxb id="myJaxb" prettyPrint="true" contextPath="com.bedas.sep.ws.cxf.service"/>
</dataFormats>
<route errorHandlerRef="dlc" id="imaRoute1">
<from uri="cxf:bean:ima-okuma?dataFormat=MESSAGE"/>
<wireTap uri="activemq:queue:aysq?jmsMessageType=Object"/>
<inOnly uri="activemq:queue:imaokumaq"/>
<to uri="velocity:response.vm"/>
<!-- <camel:transform><camel:constant>OK</camel:constant></camel:transform> -->
<!-- <to uri="cxf:bean:ays-service?dataFormat=POJO"/> -->
<!-- <convertBodyTo type="com.bedas.ays.ws.service.BegisModel"/> -->
<!-- <marshal> -->
<!-- <soapjaxb contextPath="com.bedas.sep.ws.cxf.service" version="1.1" elementNameStrategyRef="myNameStrategy"/> -->
<!-- </marshal> -->
<!-- <multicast parallelProcessing="true" executorServiceRef="executor" stopOnException="false"> -->
<!-- <inOnly uri="activemq:queue:imaokumaq"/> -->
<!-- <to uri="aysProcessor"/> -->
<!-- </multicast> -->
</route>
<route errorHandlerRef="dlc" id="imaRoute2">
<from uri="activemq:queue:aysq?jmsMessageType=Object"/>
<camel:log message="BURADAYIMMMM"></camel:log>
<to uri="aysProcessor"/>
<!-- <unmarshal> -->
<!-- <soapjaxb contextPath="com.bedas.sep.ws.cxf.service" version="1.1" elementNameStrategyRef="myNameStrategy"/> -->
<!-- </unmarshal> -->
<!-- <convertBodyTo type="com.bedas.ays.ws.service.BegisModel"/> -->
<!-- <from uri="aysProcessor"/> -->
<!-- <to uri="cxf:bean:ays-service?dataFormat=POJO"/> -->
</route>
</camelContext>
</beans>
<!-- END SNIPPET: e1 -->
并在mvn:install
中部署它时,它会在问题标题中抛出异常。这是我的fuse karaf container
文件:
pom.xml