You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by the_biswa <bi...@gmail.com> on 2010/08/11 11:28:06 UTC

calling a new service from sm bean

Hi,

In one of my projects I need to call a new service from sm bean. For that
what I did in the bean code is as follows
1. My bean class implements MessageExchangeListener
2. I've defined a destination as follows
@ExchangeTarget(uri="service:http://servicemix.apache.org/samples/bridge/cbr")
private Destination service1;
3. Then I've sent the request to the new destination and waited for it's
response in the following way
Future<NormalizedMessage> future =
service1.send(MessageUtil.copy(normalizedMessage));
NormalizedMessage response = (NormalizedMessage)future.get();

My Question is : is it the right way of calling a new service from sm bean
or is there any better approach of doing the same?

I'm using smx4
-- 
View this message in context: http://servicemix.396122.n5.nabble.com/calling-a-new-service-from-sm-bean-tp2471663p2471663.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.