9 Replies Latest reply on Dec 1, 2009 11:17 AM by speleomaniaque

    cxfbc:consumer and camel routes

    speleomaniaque

      Hi everybody,

       

      I have an interesting concept problem with cxf-wsdl-first-osgi-package example project...

       

      I had deployed the example project with success, then I try to modified according to my needs....

       

      If I understand correctly cxfbc-bundle project with the cxfbc:consumer receives the request and redirects it to the cxfse-bundle cxfse:endpoint....

       

      Now, what I am trying to place in middle a camel route that would apply a transformation to received message and then send it to service but I can't successfully build the route...

       

      I am always getting NoSuchEndpointException from camel with PersonalServicePort as Endpoint name there....

       

      Do you see something wrong in the configuration or the way I am trying to achieve this scenario is wrong or what would you recommend me to implement this scenario...

       

      Below you can see the router configuration I have and the consumer and service projects...

       

       

       

        • 1. Re: cxfbc:consumer and camel routes
          socallag

          Hi,

           

          The uri's in your routes are incorrect, they need to be prepended with a protocol.

           

          A CXF endpoint is of the form: cxf:bean:cxfEndpoint[?options]

           

          See the following for more details and an example.

           

          http://camel.apache.org/cxf.html

          http://camel.apache.org/cxf-example.html

           

          Regards,

           

          Seán.

          • 2. Re: cxfbc:consumer and camel routes
            speleomaniaque

            Hi,

             

            unfortunately that didn't helped, I am getting the same Exception....

             

            What I see in this sample, cxf and router definitions are in the same file but I build my example project based on osgi bundle and there 3 bundles and cxf:consumer and camel router are in a separate file.

             

            Is this a problem for this scenario, I try to export the package from router osgi bundle but there is no java code so how can I export a route from osgi bundle, that I don't know....

             

             

            • 3. Re: cxfbc:consumer and camel routes
              lyfe

              did you ever resolve this issue..i'm getting same error.

              • 4. Re: cxfbc:consumer and camel routes
                speleomaniaque

                No,

                 

                unfortunately it is not possible to do  this scenario with camel and 3 bundles....

                 

                Camel routes has to be in the same bundle as consumer and provider....

                 

                Now I realized this scenario with EIP...

                • 5. Re: cxfbc:consumer and camel routes
                  rlg673

                  Hi,

                   

                  You should be able to use camel-nmr endpoints at the beginning and end of your camel route to accomplish your objective using three separate bundles.

                   

                  /Ron

                  • 6. Re: cxfbc:consumer and camel routes
                    lyfe

                    I have the following cxfbc consumer and cxfbc producer:

                     

                    <cxfbc:consumer wsdl="mycalculate.wsdl"

                                            service="calculate:CalculateService"

                                            endpoint="soap"

                                            targetService="calculate:CalculateService"

                                            targetEndpoint="calculate:Calculate"

                                            locationURI="http://myserver:8000/Calculate"/>

                     

                    <cxfbc:producer wsdl="mycalculate.wsdl"

                                           service="calculate:CalculateService"

                                           endpoint="calculate:Calculate"

                                            locationURI="http://myserver:8080/services/Calculate"/>

                     

                    Currently, I have the following flow:

                     

                    external client --> cxf consumer --> cxf producer --> external service

                     

                    How would I introduce routing btwn the consumer and producer that would result in the following flow:

                     

                    external client --> cxf consumer --> routing --> cxf producer --> external client

                    • 7. Re: cxfbc:consumer and camel routes
                      sergeyb_deleteusersergeyb

                      cxfbc:consumer typically delegates to a cxfse endpoint.

                       

                      Most  likely you'll need to introduce an eip wiretap which cxfbc:consumer will delegate to.  Wiretap's inListener will in turn delegate to a cfxbc:provider.

                       

                      If you don't want to introduce a cxfse endpoint then most likely you'll need to ensure you have an in-only cxfbc:consumer and then use an eip static receipient list instead to delegate to cxfbc provider

                      • 8. Re: cxfbc:consumer and camel routes
                        lyfe

                        Hmm..I think that won't accomplish what I'm trying to do.

                         

                        I would like to accomplish the aggregation pattern and return results.  With the InOnly mep, I won't be able to return the responses.

                         

                        How could I implement passing an external web service call to multiple external web service providers and return the responses?

                        • 9. Re: cxfbc:consumer and camel routes
                          speleomaniaque

                          First of all my first I said it is not possible to that with multiple osgi bundles, so consumer bundle, camel bundle, xslt bundle, producer bundle, etc...

                           

                          My tests to consolidate the solution this way didn't functioned but if you pack everything to one bundle there is no problem...

                           

                          Aggregation pattern should solve your problem......