Prathiba,

At this point, in your interceptor, you're still working with a JBIExchange implementation for Exchange, which has the JBIExchange.getMessageExchange() method to access the underlying JBI Message exchange. The JBI Message exchange will have the ServiceMix JBI property I mentioned before, so you can copy that to your message. I would also suggest you copy it to the Camel Message instead of the Exchange (use exchange.getIn().setHeader() instead of exchange.setProperty()).

Regards,

Gert

pratibhaG wrote:
I tried as per your suggestion like this:

from("jbi:service:http://servicemix.in2m.com/samples/http/jmsConsumer1";)
        .intercept(new DelegateProcessor() {
                      public void process(Exchange exchange) {
                          try {
                                  proceed(exchange);
exchange.setProperty("serviceName","http://servicemix.in2m.com/samples/http/MyProviderService";);
                                  ErrorEnrich.sendErrorToErrorHandler(exchange);
                          } catch (Exception e) {
                                                        e.printStackTrace();
                                                  }
                      };
}).to("jbi:service:http://servicemix.in2m.com/samples/http/MyProviderService?mep=in-out";); But here I am manually setting the serviceName as the jbi service. i dont want this.
suppose I want to send the message to two sevices like this:

from("jbi:service:http://servicemix.in2m.com/samples/http/jmsConsumer1";)
        .intercept(new DelegateProcessor() {
                      public void process(Exchange exchange) {
                          try {
                                  proceed(exchange);
                                  ErrorEnrich.sendErrorToErrorHandler(exchange);
                          } catch (Exception e) {
                                                        e.printStackTrace();
                                                  }
                      };
}).to("jbi:service:http://servicemix.in2m.com/samples/http/MyProviderService1?mep=in-out";) .to("jbi:service:http://servicemix.in2m.com/samples/http/MyProviderService2?mep=in-out";);

Then how can get the name of the sevice which causes error?Please help.

Pratibha


Reply via email to