2 Replies Latest reply on Jul 3, 2008 6:27 AM by jayasreeb

    Urgent: Calling and getting response from External web service using FUSE

    jayasreeb

      Hi

       

       

      I have written a Java Method(HelloMethod) which returns XML as output.I am exposing this Java Method as web service through axis and tomcat.

       

      Now My requirement is I need to call this external web service(HelloMethod) from Fuse ESB and need to get the response back from this .

       

      1.What are the service units do I need to create to do this?

      2.What are the entries do I need to make in xbean.xml,pom.xml?

      3.How do I need to write a java program in Fuse which calls this method and gets response?

       

      Jayasree.B

        • 1. Re: Urgent: Calling and getting response from External web service using FUSE
          edelln

          You should really look at the Logisticxs Demo source to learn about how some of the service units are setup.

           

          You effectively just need to setup a service unit for a servicemix bean component

           

          put the servicemix-bean dependency into your pom.xml

           

          In the src have a java class that will implement MessageExchangeListener and in your onMessageExchange method

           

          create your exchange and send it.

           

          You will need to create an inOut Exchange

           

          For an example of creating the exchange take a look at the OrderServicesSupport class in the Logisticx Demo. Its within the order-ws-su service unit.

           

          http://servicemix.apache.org/servicemix-bean.html

           

          rgds, Edell.

          • 2. Re: Urgent: Calling and getting response from External web service using FUSE
            jayasreeb

            Hi

             

            If the external web service is exposing java method as web service(wsdl) which returns xml as output and if I need to call and get response back from this external web service using HTTP in FUSE ESB then how do i need to go about it?

             

            IF its JMS we can go ahead with service bean and Message Exchange listerner right? Please correct me if I am wrong.

             

            Please give me the steps for HTTP.

             

            Jayasree.B