0 Replies Latest reply on Jan 5, 2016 3:04 PM by KRISHNA KANAKALA

    Can we call another camel route in websevice?

    KRISHNA KANAKALA Novice

      Hello,

       

      Is there any way to call another camel route in fuse web services?

       

      Sample flow depicted as below

       

       

      Able to Run as Local Camel Context (with out tests ) without any issues/errors.

      while calljing the web service getting below error .

       

       

      ===========================

       

      org.apache.camel.component.file.GenericFileOperationFailedException: Cannot store file: C:\Krishna_Working\BoomiTest\Inventory\Test3\HighInventory.xml

       

      at org.apache.camel.component.file.FileOperations.storeFile(FileOperations.java:292)

       

      at org.apache.camel.component.file.GenericFileProducer.writeFile(GenericFileProducer.java:277)

       

      at org.apache.camel.component.file.GenericFileProducer.processExchange(GenericFileProducer.java:165)

       

      at org.apache.camel.component.file.GenericFileProducer.process(GenericFileProducer.java:79)

       

      at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)

       

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

       

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

       

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

       

      at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)

       

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

       

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

       

      at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)

       

      at org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:51)

       

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

       

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

       

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

       

      at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)

       

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

       

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

       

      at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)

       

      at org.apache.camel.component.cxf.CxfConsumer$1.asyncInvoke(CxfConsumer.java:95)

       

      at org.apache.camel.component.cxf.CxfConsumer$1.invoke(CxfConsumer.java:75)

       

      at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)

       

      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)

       

      at java.util.concurrent.FutureTask.run(FutureTask.java:262)

       

      at org.apache.cxf.interceptor.ServiceInvokerInterceptor$2.run(ServiceInvokerInterceptor.java:126)

       

      at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)

       

      at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:131)

       

      at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)

       

      at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)

       

      at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:251)

       

      at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:261)

       

      at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:70)

       

      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1088)

       

      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1024)

       

      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)

       

      at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)

       

      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)

       

      at org.eclipse.jetty.server.Server.handle(Server.java:370)

       

      at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)

       

      at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:982)

       

      at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1043)

       

      at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)

       

      at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)

       

      at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)

       

      at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696)

       

      at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53)

       

      at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)

       

      at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)

       

      at java.lang.Thread.run(Thread.java:745)

       

      Caused by: org.apache.camel.InvalidPayloadException: No body available of type: java.io.InputStream but has value: [org.blogdemo.orderdemo.OrderInput@56b85840] of type: org.apache.cxf.message.MessageContentsList on: Message: [org.blogdemo.orderdemo.OrderInput@56b85840]. Caused by: No type converter available to convert from type: org.apache.cxf.message.MessageContentsList to the required type: java.io.InputStream with value [org.blogdemo.orderdemo.OrderInput@56b85840]. Exchange[Message: [org.blogdemo.orderdemo.OrderInput@56b85840]]. Caused by: [org.apache.camel.NoTypeConversionAvailableException - No type converter available to convert from type: org.apache.cxf.message.MessageContentsList to the required type: java.io.InputStream with value [org.blogdemo.orderdemo.OrderInput@56b85840]]

       

      at org.apache.camel.impl.MessageSupport.getMandatoryBody(MessageSupport.java:101)

       

      at org.apache.camel.component.file.FileOperations.storeFile(FileOperations.java:273)

       

      Caused by: org.apache.camel.NoTypeConversionAvailableException: No type converter available to convert from type: org.apache.cxf.message.MessageContentsList to the required type: java.io.InputStream with value [org.blogdemo.orderdemo.OrderInput@56b85840]

       

      at org.apache.camel.impl.converter.BaseTypeConverterRegistry.mandatoryConvertTo(BaseTypeConverterRegistry.java:177)

       

      at org.apache.camel.core.osgi.OsgiTypeConverter.mandatoryConvertTo(OsgiTypeConverter.java:122)

       

      at org.apache.camel.impl.MessageSupport.getMandatoryBody(MessageSupport.java:99)

       

      at org.apache.camel.component.cxf.CxfConsumer$1.checkFailure(CxfConsumer.java:235)

       

      at org.apache.camel.component.cxf.CxfConsumer$1.setResponseBack(CxfConsumer.java:209)

       

      at org.apache.camel.component.cxf.CxfConsumer$1.asyncInvoke(CxfConsumer.java:110)

       

      at org.apache.camel.component.cxf.CxfConsumer$1.invoke(CxfConsumer.java:75)

       

      at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)

       

      at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96)

       

      at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)

       

      at org.apache.cxf.phase.PhaseInterceptorChain.resume(PhaseInterceptorChain.java:277)

       

      at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:78)

       

      at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:251)

       

      at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:261)

       

      at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:70)

       

      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1088)

       

      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1024)

       

      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)

       

      at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:193)

       

      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)

       

      at org.eclipse.jetty.server.Server.handleAsync(Server.java:410)

       

      at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:519)

       

      at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:982)

       

      at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1043)

       

      at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)

       

      at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)

       

      at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)

       

      at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696)

       

      at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53)

       

      at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)

       

      at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)

       

      at java.lang.Thread.run(Thread.java:745)

       

      Caused by: org.apache.camel.component.file.GenericFileOperationFailedException: Cannot store file: C:\Krishna_Working\BoomiTest\Inventory\Test3\HighInventory.xml

       

      at org.apache.camel.component.file.FileOperations.storeFile(FileOperations.java:292)

       

      at org.apache.camel.component.file.GenericFileProducer.writeFile(GenericFileProducer.java:277)

       

      at org.apache.camel.component.file.GenericFileProducer.processExchange(GenericFileProducer.java:165)

       

      at org.apache.camel.component.file.GenericFileProducer.process(GenericFileProducer.java:79)

       

      at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)

       

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

       

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

       

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

       

      at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)

       

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

       

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

       

      at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)

       

      at org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:51)

       

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

       

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

       

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

       

      at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)

       

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

       

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

       

      at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)

       

      at org.apache.camel.component.cxf.CxfConsumer$1.asyncInvoke(CxfConsumer.java:95)

       

      at org.apache.camel.component.cxf.CxfConsumer$1.invoke(CxfConsumer.java:75)

       

      at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)

       

      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)

       

      at java.util.concurrent.FutureTask.run(FutureTask.java:262)

       

      at org.apache.cxf.interceptor.ServiceInvokerInterceptor$2.run(ServiceInvokerInterceptor.java:126)

       

      at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)

       

      at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:131)

       

      at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)

       

      at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)

       

      at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:251)

       

      at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:261)

       

      at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:70)

       

      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1088)

       

      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1024)

       

      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)

       

      at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)

       

      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)

       

      at org.eclipse.jetty.server.Server.handle(Server.java:370)

       

      at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)

       

      Caused by: org.apache.camel.InvalidPayloadException: No body available of type: java.io.InputStream but has value: [org.blogdemo.orderdemo.OrderInput@56b85840] of type: org.apache.cxf.message.MessageContentsList on: Message: [org.blogdemo.orderdemo.OrderInput@56b85840]. Caused by: No type converter available to convert from type: org.apache.cxf.message.MessageContentsList to the required type: java.io.InputStream with value [org.blogdemo.orderdemo.OrderInput@56b85840]. Exchange[Message: [org.blogdemo.orderdemo.OrderInput@56b85840]]. Caused by: [org.apache.camel.NoTypeConversionAvailableException - No type converter available to convert from type: org.apache.cxf.message.MessageContentsList to the required type: java.io.InputStream with value [org.blogdemo.orderdemo.OrderInput@56b85840]]

       

      at org.apache.camel.impl.MessageSupport.getMandatoryBody(MessageSupport.java:101)

       

      at org.apache.camel.component.file.FileOperations.storeFile(FileOperations.java:273)

       

      Caused by: org.apache.camel.NoTypeConversionAvailableException: No type converter available to convert from type: org.apache.cxf.message.MessageContentsList to the required type: java.io.InputStream with value [org.blogdemo.orderdemo.OrderInput@56b85840]

       

      at org.apache.camel.impl.converter.BaseTypeConverterRegistry.mandatoryConvertTo(BaseTypeConverterRegistry.java:177)

       

      at org.apache.camel.core.osgi.OsgiTypeConverter.mandatoryConvertTo(OsgiTypeConverter.java:122)

       

      at org.apache.camel.impl.MessageSupport.getMandatoryBody(MessageSupport.java:99)

       

      +++++++++++++++++++++++++++++