Hi
I'm trying something similar. But encountered problems with the routing
from and back to JBI.
I configured a route via Camel RouteBuilder.
--- 8< ---
...
from(FROM_URI).to(TO_URI);
...
--- 8< ---
Both URIs are JBI URIs ("jbi:endpoint:http://...").
This sample works fine.
But when I want to add some more "transformation/mediation logic" I'm
getting exceptions that the JBI Message Exchange is no longer ACTIVE.
"illegal exchange status: done"
The "transformation logic" is a simple Velocity template which
transforms my request to another format.
My RouteBuilder look like:
--- 8< ---
from(FROM_URI).setHeader("newName2",
constant("Nix")).to("velocity:template.vm").to(TO_URI);
--- 8< ---
Any ideas?
Thanks
Kristian
Guillaume Nodet schrieb:
From a camel perspective, servicemix / jbi is one of the numerous protocols
supported.
So your route should looks like:
from("jbi:endpoint:http://servicemix.apache.org/samples/bridge<http://servicemix.apache.org/samples/bridge>
/pipeline/endpoint")
.to("jbi:service:http://servicemix.apache.org/samples/bridge<http://servicemix.apache.org/samples/bridge>
/xslt")
.to(jbi:service:http://servicemix.apache.org/samples/bridge<http://servicemix.apache.org/samples/bridge>
/jms")
"jbi" tells camel to use the jbi transport. When creating a consumer, it
will activate a jbi endpoint, else it will use the delivery channel to send
the exchange to the given jbi target. See
http://servicemix.apache.org/uris.html. Such uris must be prefixed by "jbi"
.
On Dec 14, 2007 11:29 AM, Robert Thullner <[EMAIL PROTECTED]> wrote:
Hi
I have changed the bridge example so that it is triggered by a quartz,
that
writes out a message to a jms queue in regular intervals. The only thing I
changed was the http-su to a quartz-su. The example worked fine.
Now I want to replace the EIP component with a camel component that does
the
routing for me. But I have difficulties, because I do not know how to
write
camel rule. Here is the
simple example from the bridge-eip:
<?xml version="1.0"?>
<beans xmlns:eip="http://servicemix.apache.org/eip/1.0"
xmlns:b="http://servicemix.apache.org/samples/bridge">
<eip:pipeline service="b:pipeline" endpoint="endpoint">
<eip:transformer>
<eip:exchange-target service="b:xslt" />
</eip:transformer>
<eip:target>
<eip:exchange-target service="b:jms" />
</eip:target>
</eip:pipeline>
</beans>
So there is the same pipeline, as it is in the bridge example. My problem
now is, when I define camel route I do not have the service attribute set
and therefore servicemix throws an exception. This is how my camel context
looks like.
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:b="http://servicemix.apache.org/samples/bridge"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://activemq.apache.org/camel/schema/spring
http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
<camelContext xmlns="http://activemq.apache.org/camel/schema/spring"
useJmx="true" >
<route>
<from uri="b:pipeline"/>
<to uri="b:jms"/>
</route>
<package>eip.status.servicemix</package>
</camelContext>
</beans>
My MyRouteBuilder.jave file is empty.
Can anybody explain me, how I can use the EIP route in Camel?
When starting servicemix, I get this exception:
org.apache.camel.RuntimeCamelException:
org.apache.camel.NoSuchEndpointException: No endpoint could be found for:
b:pipeline
I understand the exception, because I do not have the b:pipeline defined.
My
problem is, that I do not know how to define it in camel. I am using
servicemix 3.2.1 .
Thanks for any help
Robert
--
http://gaswerk.sourceforge.net