Hi,

I tried to send message from servicemix-bean to anothor servicemix-bean. 

  //create created
   InOnly sendExchange =
channel.createExchangeFactory().createInOnlyExchange();
   
   //create normalized message
   NormalizedMessage message = sendExchange.createMessage();
                        
   message.setProperty("name", "Racem");
   message.setContent(new StreamSource(new StringReader("hello")));
                        
  sendExchange.setInMessage(message);
                        
  QName qName = new QName("http://esbinaction.com/esb";, "bean");
                        
  //send message
  sendExchange.setService(qName);
  channel.send(sendExchange);

when i deploy this solution i receive the following exception: 
java.lang.IllegalStateException: A bean acting as a consumer and using the
channel to send exchanges must implement the MessageExchangeListener
interface

my bean already implement MessageExchangeListener interface

do you have an idea of this exception

thanks


--
View this message in context: 
http://servicemix.396122.n5.nabble.com/Servicemix-bean-send-messages-tp413004p5713546.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to