1 2 3 Previous Next 30 Replies Latest reply on May 3, 2010 11:51 AM by Fernando Salceda Go to original post
      • 15. Re: Camel Router to a Web Service (InOut)
        Claus Ibsen Master

        I will let on of the SMX people take a look at this. For me the mep option at the consumer level doens't make sense. Webservices is by nature request/response based.

         

        If you do this in pure Camel, eg then that would be easy:

        from("cxf:bean:MyWebService").wireTap("tapMe").process(SET SOME REPLY HERE)
        

         

        • 16. Re: Camel Router to a Web Service (InOut)
          Danny Kruitbosch Newbie

          Hi Andy,

           

          Glad to be of help. I'm just starting to discover the power of fuse esb and I have loads of fun experimenting with it....

           

          You can add a trace="true" into the camelContext in your spring config

          e.g. <osgi-camel:camelContext xmlns="http://activemq.apache.org/camel/schema/spring" trace="true">

           

          Then on the smx console you can see what's happening with the log commands.

          This helps me a lot when solving these kinds of issues.

           

          Reqards,

           

          Danny

          • 17. Re: Camel Router to a Web Service (InOut)
            Danny Kruitbosch Newbie

            Hi Andy,

             

            Playing around with smx it just hit me, and I have a solution to you're issue

            I have a similar setup, and I've changed it to see if I could reproduce you're issue.

             

            The setup I have:

             

            soap client -> soap consumer bc -> camel router -> soap provider bc -> real service

             

            The problem lies in you're camel route. If you define a jbi endpoint in the from statement of your camel route, this becomes an exposed endpoint in the nmr. Make sure this differs from your consumer bc endpoint. Next adjust your consumer config to specify the camel jbi endpoint as it's target. And of course the camel route should point to your service engine endpoint in the "to" statement.

             

            What happens in your current config, is that you have to similar endpoints defined (consumer bc and camel) and since the camel endpoint is not exposed "outside" the esb, you'll always bypass it.

            Also there is no need to convert the soap body before the wiretap. The wiretap will convert to string automatically if you specify a file uri.

             

            Hope this is clear and helps, if not send me a PM and I'll try to help some more.

             

            Regards,

             

            Danny

             

            P.S. See http://camel.apache.org/jbi.html for more info on this

             

            Edited by: dkruitbosch on Apr 15, 2010 12:42 PM

            • 18. Re: Camel Router to a Web Service (InOut)
              Gert Vanthienen Novice

              L.S.,

               

              If the JBI MessageExchange is being sent to this route, it will only do the wiretap that is inside the route.  If you want to create a route with a wiretap before the service, you should expose that as another endpoint, e.g.

               

              from("jbi:endpoint:http://purchase_order.srcinc.com/customerService/tapped")

              .wireTap("file:C:/EW/webinar/customer/soap/?fileName=report.txt")

              .to("jbi:endpoint:http://purchase_order.srcinc.com/customerService/endpoint");

               

              You can now configure your CXF consumer to target the 'tapped' service, which will do the wiretap and forward to the original endpoint.

               

              Regards,

               

              Gert

              • 19. Re: Camel Router to a Web Service (InOut)
                Andrew Whelan Newbie

                Success.

                Actually the following does what I want it to.

                 

                 from("jbi:endpoint:http://purchase_order.srcinc.com/routeService/CustomerServiceRouting")
                .wireTap("file:C:/EW/webinar/customer/soap/?fileName=report.txt")
                .to("jbi:endpoint:http://purchase_order.srcinc.com/customerService/endpoint")
                          ;          
                

                 

                Where

                /routeService

                is my routing service

                CustomerServiceRouting is the routing endpoint

                 

                So the BC is

                     <cxfbc:consumer wsdl="classpath:wsdl/CustomerService.wsdl"

                          targetService="http://purchase_order.srcinc.com:routeService"

                          targetEndpoint="routeEndpoint"/>

                 

                /CustomerService

                is my service engine service

                and "endpoint" is my service engine endpoint.

                The service engine doesn't need to be exposed to the outside world. Just needs to be available within the ESB.

                 

                Thanks to Danny for helping plug the final missing pieces in.

                Thanks to Willem, Freeman, and Clause for help other help along the way. I couldn't have gotten this far without you guys.

                • 20. Re: Camel Router to a Web Service (InOut)
                  Fernando Salceda Novice

                  Hi there, how did you manage to get a portion of the body, parsed it or made the parameters mapping from one webservice message to the other one?

                  My original webservice operation and request differs from the final webservice operation and request I want to invoke. So I have to map the operation and parameters. I already have: Cxf-consumer-BC -> CamelRouter ->  Cxf-provider-BC -> WebService. The routing flow works fine because Its logging where the router is calling. But when the provider receives the original message it crashes:

                   

                  {{{

                  16:19:40,676 | INFO  | x-camel-thread-4 | route14                          | rg.apache.camel.processor.Logger  212 | ************ TO ADD

                  16:19:40,688 | ERROR | -cxf-bc-thread-5 | CxfBcComponent                   | icemix.common.AsyncBaseLifeCycle  480 | Error processing exchange org.apache.servicemix.jbi.runtime.impl.InOutImpl@ef59ba

                  java.lang.NullPointerException

                       at org.apache.servicemix.cxfbc.CxfBcProvider.process(CxfBcProvider.java:206)

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

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

                       at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchangeInTx(AsyncBaseLifeCycle.java:478)

                       at org.apache.servicemix.common.AsyncBaseLifeCycle$2.run(AsyncBaseLifeCycle.java:347)

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

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

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

                  16:19:40,689 | ERROR | x-camel-thread-4 | DefaultErrorHandler              | rg.apache.camel.processor.Logger  248 | Failed delivery for exchangeId: 5cffe8b6-a251-47fd-a0a4-edb9d6034f63. Exhausted after delivery attempt: 1 caught: java.lang.NullPointerException

                  java.lang.NullPointerException

                       at org.apache.servicemix.cxfbc.CxfBcProvider.process(CxfBcProvider.java:206)

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

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

                       at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchangeInTx(AsyncBaseLifeCycle.java:478)

                       at org.apache.servicemix.common.AsyncBaseLifeCycle$2.run(AsyncBaseLifeCycle.java:347)

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

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

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

                  16:19:40,690 | WARN  | 4@qtp-28993516-1 | PhaseInterceptorChain            | ache.cxf.common.logging.LogUtils  361 | Interceptor for {http://routing.examples.andago.com}routingExampleService#routing has thrown exception, unwinding now

                  java.lang.NullPointerException

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

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

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

                       at org.apache.servicemix.cxfbc.CxfBcConsumer$JbiChainInitiationObserver.onMessage(CxfBcConsumer.java:675)

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

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

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

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

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

                       at org.mortbay.jetty.handler.HandlerList.handle(HandlerList.java:49)

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

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

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

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

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

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

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

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

                       at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

                   

                  }}}

                   

                  Should I set the webservice operation I want to call in the provider binding component? Because the ws operation namespace and name I call in the consumer is not the same I want to call in the provider binding component. Or Should I do something like a message transform before calling the provider?

                   

                  Hope somebody could help me.

                   

                  Thanks.

                  • 21. Re: Camel Router to a Web Service (InOut)
                    Freeman(Yue) Fang Master

                    Hi,

                     

                    You must ensure the message payload meet the requirement as what cxf bc provider servicemodel (build from wsdl) expected before you send it to cxf bc provider endpoint.

                    So I believe what you need is pretty much a transformer, I guess you can also do transform in camel router, to make the message payload valid for cxf bc provider.

                     

                    Freeman

                    • 22. Re: Camel Router to a Web Service (InOut)
                      Danny Kruitbosch Newbie

                      Hi,

                       

                      In your camel router you can use XSLT transformations to transform the soap message to the new request. What I usually do is transform the whole soap message, so you can leave the soap headers intact of change them (so set the useSOAPEnvelope on true.

                       

                      your route will look something like this:

                       

                       

                       

                      Look at the camel docs on how to use the xslt component.

                      As an alternative you can create a bean to do the transform, but I usually find xslt or xquery easier when handling XML (might be because I'm not a java programmer )

                       

                      Danny

                      • 23. Re: Camel Router to a Web Service (InOut)
                        Fernando Salceda Novice

                        Hi, I did what you advised me. I activated the soap envelope and used xslt to do the message transformation. But I'm still doing something wrong because now I get this exception when I call it.

                         

                         

                        09:51:03,431 | INFO  | x-camel-thread-4 | route4                           | rg.apache.camel.processor.Logger  212 | ************ TO ADD

                        09:51:03,433 | INFO  | x-camel-thread-4 | route2plus-xslt                  | rg.apache.camel.processor.Logger   88 | Exchange[BodyType:String, Body:<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://beans.io.examples.andago.com/xsd" xmlns:top="http://toplus.examples.andago.com"><soapenv:Header/><soapenv:Body><top:toPlus><top:tpi><xsd:p1>8</xsd:p1><xsd:p2>9</xsd:p2></top:tpi></top:toPlus></soapenv:Body></soapenv:Envelope>]

                        09:51:03,435 | ERROR | -cxf-bc-thread-3 | CxfBcComponent                   | icemix.common.AsyncBaseLifeCycle  480 | Error processing exchange org.apache.servicemix.jbi.runtime.impl.InOutImpl@7210ec

                        java.lang.NullPointerException

                             at org.apache.servicemix.cxfbc.CxfBcProvider.process(CxfBcProvider.java:206)

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

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

                             at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchangeInTx(AsyncBaseLifeCycle.java:478)

                             at org.apache.servicemix.common.AsyncBaseLifeCycle$2.run(AsyncBaseLifeCycle.java:347)

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

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

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

                        09:51:03,436 | ERROR | x-camel-thread-4 | DefaultErrorHandler              | rg.apache.camel.processor.Logger  248 | Failed delivery for exchangeId: 350d178e-77b9-48a4-a360-fd2989d3a1be. Exhausted after delivery attempt: 1 caught: java.lang.NullPointerException

                        java.lang.NullPointerException

                             at org.apache.servicemix.cxfbc.CxfBcProvider.process(CxfBcProvider.java:206)

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

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

                             at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchangeInTx(AsyncBaseLifeCycle.java:478)

                             at org.apache.servicemix.common.AsyncBaseLifeCycle$2.run(AsyncBaseLifeCycle.java:347)

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

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

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

                        09:51:03,440 | WARN  | 99@qtp-1930252-1 | PhaseInterceptorChain            | ache.cxf.common.logging.LogUtils  361 | Interceptor for routingExampleService#routing has thrown exception, unwinding now

                        java.lang.NullPointerException

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

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

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

                             at org.apache.servicemix.cxfbc.CxfBcConsumer$JbiChainInitiationObserver.onMessage(CxfBcConsumer.java:675)

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

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

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

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

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

                             at org.mortbay.jetty.handler.HandlerList.handle(HandlerList.java:49)

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

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

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

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

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

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

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

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

                             at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

                         

                         

                         

                        My cxf consumer configuration:

                         

                             <soap ...

                         

                        Is that what the cxf-provider is waiting for?

                         

                         

                        Regards & Thx again.

                         

                        Edited by: fsalceda on Apr 30, 2010 8:21 AM

                        • 24. Re: Camel Router to a Web Service (InOut)
                          Freeman(Yue) Fang Master

                          Hi,

                           

                          What cxf bc provider expect is totally depend on the wsdl used for cxf bc provider.

                           

                          So I can't tell so much before I see the wsdl, also could you please post the message send to cxf bc provider endpoint?

                           

                          If you enable debug log level, you will see all messages going through NMR.

                           

                          Freeman

                          • 25. Re: Camel Router to a Web Service (InOut)
                            Danny Kruitbosch Newbie

                            Also, putting trace="true" on the <osgi:camelContext trace="true"> helps a lot in the debugging.

                             

                            Can you also post the xslt files? Maybe there's something in the xslt that doesn't create the right message for the provider-bc.

                             

                            Best way to test this is by using an xslt editor and test the transformations outside your esb config. Just create the input file and the xslt and see if the transformation result is the expected input for your provider-bc (including the soap envelope).

                             

                            Danny

                            • 26. Re: Camel Router to a Web Service (InOut)
                              Fernando Salceda Novice

                              In my previous post you can see what my final web service expects to receive I copied the soap messages from soapui, and the soap message that my cxf-consumer is receiving. In addition I set up "DEBUG" log level and I saw where it actually is crashing:

                               

                              12:12:14,532 | DEBUG | -cxf-bc-thread-2 | NMR                              | .servicemix.nmr.core.ChannelImpl  274 | Channel org.apache.servicemix.nmr.core.ChannelImpl@1fee2db dispatching exchange: [

                                id:        7e71834a-b5ab-4076-a903-b7722bfc5afa

                                mep:       InOut

                                status:    Error

                                role:      Provider

                                target:    PropertyMatchingReference[{SERVICE_NAME={http://toplus.examples.andago.com}ToPlus-Service}]

                                operation: routing

                                properties: [

                                    javax.jbi.ServiceEndpoint = org.apache.servicemix.jbi.runtime.impl.ServiceEndpointImpl@1c4cc17

                                    javax.jbi.messaging.MessageExchange = org.apache.servicemix.jbi.runtime.impl.InOutImpl@9238ca

                                    javax.jbi.messaging.sendSync =

                                    javax.jbi.servicedesc.ServiceEndpoint = org.apache.servicemix.jbi.runtime.impl.EndpointImpl@a21de3

                                    CamelToEndpoint = service:http://toplus.examples.andago.com/ToPlus-Service

                                    JbiOperation = routing

                                    javax.jbi.ServiceName = ToPlus-Service

                                    org.apache.servicemix.correlationId = 5b66de36-0b3b-4bce-8bdc-520ada159bd3

                                    javax.jbi.transaction.jta =

                                    org.apache.servicemix.senderEndpoint = provider:ID:127.0.1.1-1284e33a7f0-2:0

                                ]

                                In: [

                                  content: <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:top="http://toplus.examples.andago.com" xmlns:xsd="http://beans.io.examples.andago.com/xsd"><soapenv:Header/><soapenv:Body><top:toPlus><top:tpi><xsd:p1>8</xsd:p1><xsd:p2>9</xsd:p2></top:tpi></top:toPlus></soapenv:Body></soapenv:Envelope>

                                ]

                                error: [

                                  java.lang.NullPointerException

                                    at org.apache.servicemix.cxfbc.CxfBcProvider.process(CxfBcProvider.java:206)

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

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

                                    at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchangeInTx(AsyncBaseLifeCycle.java:478)

                                    at org.apache.servicemix.common.AsyncBaseLifeCycle$2.run(AsyncBaseLifeCycle.java:347)

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

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

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

                                ]

                              ]

                               

                               

                                • The message content and target is correct but the operation not? I think so.....

                               

                              <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:top="http://toplus.examples.andago.com" xmlns:xsd="http://beans.io.examples.andago.com/xsd"><soapenv:Header/><soapenv:Body><top:toPlus><top:tpi><xsd:p1>8</xsd:p1><xsd:p2>9</xsd:p2></top:tpi></top:toPlus></soapenv:Body></soapenv:Envelope>

                               

                              target:    PropertyMatchingReference[{SERVICE_NAME={http://toplus.examples.andago.com}ToPlus-Service}]

                               

                              operation: routing

                               

                              The operation should be toPlus, shouldn't it? Or is it nothing to do with the NullPointerException.

                               

                              I atached both wsdls (consumer and provider).

                              • 27. Re: Camel Router to a Web Service (InOut)
                                Freeman(Yue) Fang Master

                                Hi,

                                 

                                Yeah, it's the mismatch operationName cause the problem, that will cause cxf bc provider endpoint get a NULL BindingOperationInfo instance.

                                 

                                You need set correct operationName for the MessageExchange also from camel router.

                                 

                                Freeman

                                • 28. Re: Camel Router to a Web Service (InOut)
                                  Fernando Salceda Novice

                                  Now I route to the endpoint:

                                   

                                   

                                   

                                  But I got the same Exception. Is it the correct way to do that?

                                   

                                  The JbiOperation property is still the original one:

                                  JbiOperation = routing

                                   

                                  When you said "also from camel router" did you mean that I have to configure the targetOperation in the provider and also from camel router? If It were so, can't I use a provider binding component to invoke more than one operation of a web service???

                                   

                                   

                                  Log Message was:

                                   

                                  14:45:09,956 | DEBUG | -cxf-bc-thread-4 | NMR                              | .servicemix.nmr.core.ChannelImpl  198 | Channel org.apache.servicemix.nmr.core.ChannelImpl@1fee2db delivering exchange: [

                                    id:        8454ff20-7e70-4bd0-a462-a827d9b788d1

                                    mep:       InOut

                                    status:    Error

                                    role:      Provider

                                    target:    PropertyMatchingReference[{SERVICE_NAME={http://toplus.examples.andago.com}ToPlus-Service}]

                                    operation: http://toplus.examples.andago.com:toPlus

                                    properties: [

                                        javax.jbi.ServiceEndpoint = org.apache.servicemix.jbi.runtime.impl.ServiceEndpointImpl@78014a

                                        javax.jbi.messaging.MessageExchange = org.apache.servicemix.jbi.runtime.impl.InOutImpl@767bef

                                        javax.jbi.messaging.sendSync =

                                        javax.jbi.servicedesc.ServiceEndpoint = org.apache.servicemix.jbi.runtime.impl.EndpointImpl@a21de3

                                        CamelToEndpoint = service:http://toplus.examples.andago.com/ToPlus-Serviceoperation=http%3A%2F%2Ftoplus.examples.andago.com%3AtoPlus

                                        JbiOperation = routing

                                        javax.jbi.ServiceName = ToPlus-Service

                                        org.apache.servicemix.correlationId = fdd1755f-8cb0-4e4e-907e-c66aadf9c7de

                                        javax.jbi.transaction.jta =

                                        org.apache.servicemix.senderEndpoint = provider:ID:127.0.1.1-1284e33a7f0-6:0

                                    ]

                                    In: [

                                      content: javax.xml.transform.sax.SAXSource@c29ba3

                                    ]

                                    error: [

                                      java.lang.NullPointerException

                                        at org.apache.servicemix.cxfbc.CxfBcProvider.process(CxfBcProvider.java:206)

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

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

                                        at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchangeInTx(AsyncBaseLifeCycle.java:478)

                                        at org.apache.servicemix.common.AsyncBaseLifeCycle$2.run(AsyncBaseLifeCycle.java:347)

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

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

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

                                    ]

                                  ]

                                   

                                  Edited by: fsalceda on Apr 30, 2010 12:48 PM

                                   

                                  Edited by: fsalceda on Apr 30, 2010 12:49 PM

                                  • 29. Re: Camel Router to a Web Service (InOut)
                                    Freeman(Yue) Fang Master

                                    Hi,

                                    You need check the operation in MessageExchange(it's smx used exchange) but not from camel exchange header.

                                     

                                    From the log, your configuration take effect, notice this line

                                     

                                    operation: http://toplus.examples.andago.com:toPlus

                                     

                                    but this is not correct, we should use some syntax like

                                    local

                                    so it should be

                                    toPlus

                                     

                                    So use

                                    <to uri="jbi:service:http://toplus.examples.andago.com/ToPlus-Service?operation=toPlus"/>

                                     

                                    but not

                                     

                                     

                                    And you needn't specify operationName for cxfbc provider endpoint, of course it support multiple operations in one portType.

                                     

                                    Freeman