I want to use ServiceMixClient to send message to other service in the same
ServiceMix instance. The ServiceMixClient is configured by xbean.xml file,
see below:

        <bean id="client"
class="org.apache.servicemix.client.DefaultServiceMixClient">
                <constructor-arg ref="jbi" />
        </bean>

        <sm:container id="jbi">
        </sm:container>

In the service, I use this code to send message:

Destination destination =
client.createDestination("http://localhost:8195/my_service/";);
InOut io = destination.createInOutExchange();
io.getInMessage().setContent(new StringSource("<hello>hello</hello>"));
client.send(io);

ServiceMix will throw an exception:

javax.jbi.messaging.MessagingException: Could not find route for exchange:
InOu
[
  id: ID:3.36.228.84-124f6422f13-44:0
  status: Active
  role: provider
  in: <?xml version="1.0" encoding="UTF-8"?><hello>hello</hello>
] for service: null and interface: null

Does anyone know this error?

thanks,

Zhao Yi
-- 
View this message in context: 
http://old.nabble.com/An-error-about-%22Could-not-find-route-for-exchange%3A-InOut%22-tp26355888p26355888.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to