Hi, all.
I'm trying to use a Drools route command to route a message to a specific
operation within a servicemix-bean based service unit. I think I am not
getting the URI right. From within the Drools file, I route as shown below:
jbi.route("endpoint:urn:myNamespace:myService:endpoint");
This isn't working, but that's not really what I would like anyway. I would
like to route to a specific operation within the myService servicemix-bean
service unit. The operation is defined as shown:
@Operation(name = "operationInOut")
public void myExchangeMethod1(MessageExchange messageExchange)
throws MessagingException {
// Ensure that the Message Exchange is appropriate
if (!(messageExchange instanceof InOut)) {
log.error("Didn\'t receive expected InOut message: "
+ messageExchange);
throw new MessagingException("");
}
// Handle the request
InOut io = (InOut) messageExchange;
log.info("operationInOut() called with exchange: " +
messageExchange);
// Create the response
NormalizedMessage message = io.createMessage();
message.setContent(new StringSource("<hello>back</hello>"));
io.setOutMessage(message);
// Send the response
channel.send(messageExchange);
}
Does anyone know how I can specify a specific bean operation in a URI to be
used in Drools?
Thanks for the help.
Justin
--
View this message in context:
http://www.nabble.com/Routing-from-Drools-service-unit-to-servicemix-bean-service-unit-tf3680741s12049.html#a10286391
Sent from the ServiceMix - User mailing list archive at Nabble.com.