2 Replies Latest reply on Jan 23, 2008 6:33 AM by jstrachan

    EIP help

    eamdwyer

      Hi

      I've been looking at the bridge example which shows how a request can be sent through an EIP pipeline from a HTTP component to an XSLT component and then on to a JMS component. The example uses a http binding component that has its defaultMep set to in-only.

       

      Can an EIP only  bridge from in-only MEPs?

       

      I've tried to modify the cxf-ws-security example to bridge from the cxf-bc to a component I created myself but am getting the follwing error when I invoke on it. Is it possible to bridge from an InOut MEP?

      22-Jan-2008 13:42:48 org.apache.cxf.phase.PhaseInterceptorChain doIntercept

      INFO: Interceptor has thrown exception, unwinding now

      org.apache.cxf.interceptor.Fault: Use an InOnly or RobustInOnly MEP

      at org.apache.servicemix.cxfbc.CxfBcConsumer$JbiPostInvokerInterceptor.handleMessage(CxfBcConsumer.java:428)

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

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

      at org.apache.servicemix.cxfbc.CxfBcConsumer.process(CxfBcConsumer.java:172)

      at org.apache.servicemix.cxfbc.CxfBcConsumer$JbiInvokerInterceptor.handleMessage(CxfBcConsumer.java:404)

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

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

      at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:268)

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

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

      at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)

      at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)

      at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)

      at org.mortbay.jetty.Server.handle(Server.java:324)

      at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)

      at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)

      at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:730)

      at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)

      at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)

      at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)

      at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)

      Caused by: java.lang.UnsupportedOperationException: Use an InOnly or RobustInOnly MEP

      at org.apache.servicemix.eip.patterns.Pipeline.processAsyncProvider(Pipeline.java:315)

      at org.apache.servicemix.eip.patterns.Pipeline.processAsync(Pipeline.java:278)

      at org.apache.servicemix.eip.EIPEndpoint.process(EIPEndpoint.java:161)

      at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:538)

      at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:490)

      at org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)

      at org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)

      at org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:170)

      at org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:167)

      at org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)

      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)

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

       

      Edited by: eamdwyer on Jan 22, 2008 9:20 AM

        • 1. Re: EIP help
          bsnyder

           

          I've tried to modify the cxf-ws-security example to bridge from the cxf-bc to a component I created myself but am getting the follwing error when I invoke on it. Is it possible to bridge from an InOut MEP?

          22-Jan-2008 13:42:48 org.apache.cxf.phase.PhaseInterceptorChain doIntercept

          INFO: Interceptor has thrown exception, unwinding now

          org.apache.cxf.interceptor.Fault: Use an InOnly or RobustInOnly MEP

           

           

          That is correct, the servicemix-eip pipeline will only bridge from an InOnly or a RobustInOnly MEP to a InOut MEP. See the documentation for the pipeline pattern.

           

          Bruce

          • 2. Re: EIP help
            jstrachan

            You could try using the Camel service unit instead as that can handle different mesage exchange patterns more seamlessly.

             

            e.g.

             

            from("something").
              to("xslt:com/acme/foo.xsl").
              to("activemq:MyQueue");
            

             

            which would work for an InOut or InOnly.