7 Replies Latest reply on Apr 6, 2009 9:39 AM by jgoodyea

    Intercepting all messages that flow through NMR

      Hi,

       

      I have to interceptall messages that flow through NMR For this I have done the following.

       

      I have created a class called EchoAll as follows:

       

      import org.apache.servicemix.nmr.api.event.ExchangeListener;

      import org.apache.servicemix.nmr.api.Exchange;

       

      public class EchoAll implements ExchangeListener {

          public void exchangeSent(Exchange exchange) {System.out.println("EXCHANGE SENT");}

          public void exchangeDelivered(Exchange exchange) {System.out.println("EXCHANGE DELIVERED");}

          public void exchangeFailed(Exchange exchange) {System.out.println("EXCHANGE FAILED");}

      }

       

      I compiled and packaged the above class in to InterceptAll.jar.

      I then placed  InterceptAll.jar file in fuse-esb-4.0.0.4\lib folder.

       

      I then created EchoAll.xml with the following content:

       

       

       

      I placed the above EchoAll.xml in fuse-esb-4.0.0.4\deploy folder and restarted Fuse.

       

      When I give "osgi list" command I am able to see EchoAll.xml however When I invoke cxf-wsdl-first example (from fuse-esb-4.0.0.4\examples\cxf-wsdl-first folder) through its client. I do not get any of EXCHANGE SENT, EXCHANGE DELIVERED, EXCHANGE FAILED.

       

      Please Help!!

       

      -Harshit