2 Replies Latest reply on Apr 22, 2009 11:03 AM by aordin

    Can I merge several web services into one?

    aordin

      Hi to everyone!

       

      I'm newbie into FUSE world, and I have one big doubt about how use multiple web services with FUSE ESB.

       

      My situation:

       

      1.- Exist an external application that expose 3 different web services(implemented in CXF).

      2.- I want to create one new web service using FUSE which:

      • The new FUSE Web Service receive one object with some attributes form the client application.

      • It must call the 3 external Web Services using the attributes of requested object

      • The response of the 3 external Web Services must be merged into only one and returned like a response from the new FUSE Web Service.* View attached graphic*(Named "severalServices.jpeg", at the top of the message).

       

      Note: In this case, the 3 external web services uses different attributes in the request.

       

      My doubt:

       

      What steps must I take to develop this new webservice?

       

      I need a guide like for example:

      1.- Create a java service to receive the object request

      2.- Add annotations to make a WebService

      3.- ......

       

      Or if is easier using some FUSE tools, ...

       

      Note: If it requires use some framework, I prefer use OSGI(not JBI) if it's possible

      Note2: I'm using FUSE ESB - 4.0.0.2

       

      Thank you a lot!

        • 1. Re: Can I merge several web services into one?
          hzbarcea_hzbarcea

          Hi,

           

          I think the best option for you in this case is camel, but you can create your own su as well.  Camel is integrated into Fuse ESB 4.x, please check the example.  Camel has a camel-cxf component that allows you to both expose a camel route as a web service as well as make calls to web services, so that's one more thing you will need.

           

          There is a great tutorial on the Apache Camel site about integrating camel and cxf.  I'd suggest going through the whole tutorial, not just part-5.

           

          I don't know enough about the nature of the messages, so I cannot tell you if you can achieve what you want in on or more routes, but the idea is to use a RouteBuilder to create one (or more) route(s) that receive your request use its content to create requests for your three web services and aggregate the response in some way and send the response back.  Depending on your exchange pattern (in/in-out sync/async) you may have to write your own processor, but that's simple enough.

           

          Camel components are all osgi bundles, so it works great with esb and osgi, no jbi needed.

          • 2. Re: Can I merge several web services into one?
            aordin

            Thank you hzbarcea!

             

            I'm reading the documentation about camel.

             

            But I see the FUSE INTEGRATION DESIGNER tool and I think will be a good tool to solve quickly my problem,  I post a question about in the FUSE Tooling forum  because I try to do this, but I find some problems.

             

            Any help is good for me.

             

            Regards.