3 Replies Latest reply on Mar 8, 2012 5:36 AM by raghav.vis

    Choose web service dynamically

    stsc

      Hi

       

      I am using SOAPClient (jboss esb 4.10) and configure the SOAP action and WSDL in the jboss-esb.xml. I would like to do this dynamically instead. Can it be done? Should I use an another action?

       

      There can be multiple instances of the end system and I need to choose the specific system based on message content and set the url based on this.

       

      regards

      Steffen

        • 1. Re: Choose web service dynamically
          sunil_patel
          • 2. Re: Choose web service dynamically
            mageshbk

            You could use a CBR (Content Based Routing) mechanism. Have a look at fun_cbr quickstart. You could make each of the team a SOAPClient.

            • 3. Re: Choose web service dynamically
              raghav.vis

              Hello Steffen,

               

              This is possible in two ways:

               

               

              1. Create a Content Based Router as suggested by Magesh. You can configure SOAP CLIENTS for all the Service providers as seperate services.
              2. You would also have a condition based on which you would choose the endpoint. configure this condition in the Content Based Router.
                1. Now you have two options: Either
                  1. to use Drools
                  2. Xpath condition to point to the location of the element in the message object.
              3. Now what happens is, when the execution reaches the CBR, the service is automatically picked up based on the condition

               

               

              1. The Second way to do would be use a default WSDL URL and Override the WSDL location by accessing the config tree object. This helps you to handle the WSDL location to be invoked in a more dynamic way.

                                  Hope you have the list of the endpoints(WSDL) in a store or a property file.

               

               

              Hope this helps. Let me know if you are finding it difficult to follow the above.

               

              Regards,

              Raghav.V