1 Reply Latest reply on May 12, 2010 7:49 PM by Freeman(Yue) Fang

    accessing external http web service from NMR with ServiceMix 4.2.0

    Rafal N Newbie

      Hi everyone,

       

      I want to invoke external web service from NMR. I looked through the examples and I have an idea to initiate a message from Camel's timer and route it to nmr endpoint, so I put this into xml configuration file:

       

      ...

           

       

      But this does not work:

       

      org.apache.servicemix.nmr.api.ServiceMixException: Could not dispatch exchange. No matching endpoints.

           at org.apache.servicemix.nmr.core.FlowRegistryImpl.dispatch(FlowRegistryImpl.java:110)

           at org.apache.servicemix.nmr.core.ChannelImpl.dispatch(ChannelImpl.java:286)

           at org.apache.servicemix.nmr.core.ChannelImpl.sendSync(ChannelImpl.java:141)

           at org.apache.servicemix.nmr.core.ChannelImpl.sendSync(ChannelImpl.java:127)

           at org.apache.servicemix.camel.nmr.ServiceMixProducer.process(ServiceMixProducer.java:58)

           at org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:97)

           at org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:95)

           at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:146)

           at org.apache.camel.processor.SendProcessor.doProcess(SendProcessor.java:94)

           at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:82)

           at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)

           at org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:53)

           at org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:82)

           at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:93)

           at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)

           at org.apache.camel.processor.RedeliveryErrorHandler.processExchange(RedeliveryErrorHandler.java:177)

           at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:143)

           at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:88)

           at org.apache.camel.processor.DefaultErrorHandler.process(DefaultErrorHandler.java:49)

           at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:228)

           at org.apache.camel.processor.Pipeline.process(Pipeline.java:74)

           at org.apache.camel.processor.UnitOfWorkProcessor.processNext(UnitOfWorkProcessor.java:66)

           at org.apache.camel.processor.DelegateProcessor.process(DelegateProcessor.java:48)

           at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)

           at org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(TimerConsumer.java:103)

           at org.apache.camel.component.timer.TimerConsumer$1.run(TimerConsumer.java:50)

           at java.util.TimerThread.mainLoop(Timer.java:512)

           at java.util.TimerThread.run(Timer.java:462)

      14:35:56,933 | ERROR | osgiTimer        | DefaultErrorHandler              | rg.apache.camel.processor.Logger  248 | Failed delivery for exchangeId: df3122c4-12ad-46d9-a39e-d01d6b2f7c76. Exhausted after delivery attempt: 1 caught: org.apache.servicemix.nmr.api.ServiceMixException: Could not dispatch exchange. No matching endpoints.

      org.apache.servicemix.nmr.api.ServiceMixException: Could not dispatch exchange. No matching endpoints.

           at org.apache.servicemix.nmr.core.FlowRegistryImpl.dispatch(FlowRegistryImpl.java:110)

           at org.apache.servicemix.nmr.core.ChannelImpl.dispatch(ChannelImpl.java:286)

           at org.apache.servicemix.nmr.core.ChannelImpl.sendSync(ChannelImpl.java:141)

           at org.apache.servicemix.nmr.core.ChannelImpl.sendSync(ChannelImpl.java:127)

           at org.apache.servicemix.camel.nmr.ServiceMixProducer.process(ServiceMixProducer.java:58)

           at org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:97)

           at org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:95)

           at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:146)

           at org.apache.camel.processor.SendProcessor.doProcess(SendProcessor.java:94)

           at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:82)

           at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)

           at org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:53)

           at org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:82)

           at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:93)

           at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)

           at org.apache.camel.processor.RedeliveryErrorHandler.processExchange(RedeliveryErrorHandler.java:177)

           at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:143)

           at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:88)

           at org.apache.camel.processor.DefaultErrorHandler.process(DefaultErrorHandler.java:49)

           at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:228)

           at org.apache.camel.processor.Pipeline.process(Pipeline.java:74)

           at org.apache.camel.processor.UnitOfWorkProcessor.processNext(UnitOfWorkProcessor.java:66)

           at org.apache.camel.processor.DelegateProcessor.process(DelegateProcessor.java:48)

           at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)

           at org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(TimerConsumer.java:103)

           at org.apache.camel.component.timer.TimerConsumer$1.run(TimerConsumer.java:50)

           at java.util.TimerThread.mainLoop(Timer.java:512)

           at java.util.TimerThread.run(Timer.java:462)

      ...

       

      I can see (with nmr:list) that the nmr endpoint does not get registered. How should this be actually done?

       

      Any help would be greatly appreciated, thanks!