You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by youhaodeyi <yo...@gmail.com> on 2009/11/15 06:40:57 UTC

An error about "Could not find route for exchange: InOut"

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.


Re: An error about "Could not find route for exchange: InOut"

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

The exception here means there's no jbi endpoint at URI as you  
specified "http://localhost:8195/my_service/".

You need take a look at client api, "Working with URIs and  
Destinations"[1], especially what the URIs should be[2]

[1]http://servicemix.apache.org/client-api.html
[2]http://servicemix.apache.org/uris.html

Freeman
On 2009-11-15, at 下午1:40, youhaodeyi wrote:

>
> 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.
>


-- 
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com