Justin,

On (1), you'll find some more information about these URIs. I think that for your case, it should look something like http://foo.bar/MyInterface/MyOperation

Gert

(1) http://incubator.apache.org/servicemix/uris.html

Justin Stewart wrote:
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

Reply via email to