In previous camel projects (deployed to Tomcat) I used the <camel:endpoint> to define endpoints and reference these from Routes in DSL. I am now experimenting with karaf & Fuse and using the ‘blueprint’ XML file with ‘camel:endpoint’ does not appear to work. The XMLs at the end of this message show the blueprint that failed and the Spring XML that works.
Notes I used the maven archetype blueprint and spring to generate the deployment jar I am mainly interested in implementing the routes using DSL and defining the ‘camel endpoint’ in the XML file. Any information on how to define camel endpoint using blueprint will be great. ----------------------------- blueprint <?xml version="1.0" encoding="UTF-8"?> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camel="http://camel.apache.org/schema/blueprint" xsi:schemaLocation=" http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd"> <bean id="helloBean" class="com.blss.test.AsTest03.HelloBean"> <property name="say" value="Hi from Camel"/> </bean> <camel:endpoint id="timerX" uri="timer:foo?period=5000"/> <camelContext id="blueprintContext" trace="false" xmlns="http://camel.apache.org/schema/blueprint"> <route id="timerToLog"> <from ref="timerX"/> <setBody> <method ref="helloBean" method="hello"/> </setBody> <log message="The message contains ${body}"/> <to uri="mock:result"/> </route> </camelContext> </blueprint> ------------------------------------- Spring works OK <?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" 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"> <bean id="helloBean" class="com.blss.test.AsTest04.HelloBean"> <property name="say" value="Hi from Camel"/> </bean> <camel:endpoint id="timerX" uri="timer:foo?period=5000"/> <camel:camelContext xmlns="http://camel.apache.org/schema/spring"> <route id="timerToLog"> <from ref="timerX"/> <setBody> <method ref="helloBean" method="hello"/> </setBody> <log message="The message contains ${body}"/> <to uri="mock:result"/> </route> </camel:camelContext> </beans> -- View this message in context: http://camel.465427.n5.nabble.com/Referencing-camel-endpoint-defined-in-the-blueprint-XML-does-not-appears-to-work-tp5749850.html Sent from the Camel - Users mailing list archive at Nabble.com.
