7 Replies Latest reply on Nov 20, 2014 10:18 AM by kcbabo

    Expose an existing wsdl in Switchyard

    amit4497

      Hi All,

       

      I want to know how do I expose an existing WSDL in Switchyard. Does switchyard support this, if yes how do I do it.

       

      Also I want to know how to expose multiple existing WSDLs in switchyard.

       

      Regards,

      Amit

        • 1. Re: Expose an existing wsdl in Switchyard
          tungtd

          Hi Amit,

          For the first question "I want to know how do I expose an existing WSDL in Switchyard". You could find the example in quickstart soap-binding.

          "Also I want to know how to expose multiple existing WSDLs in switchyard." Could you describe more?

          1 of 1 people found this helpful
          • 2. Re: Expose an existing wsdl in Switchyard
            amit4497

            Thank you for replying

             

            I have 10 country specific wsdls which contains request/response for creating, updating, deleting and get a ticket details.

             

            Since these wsdls are country specific so the same parameter might have different names coz of different language of the countries.

             

            Now the purpose of all the wsdls are same so it should point to same service. So I want to expose multiple existing wsdls pointing to the same service.

             

            Also I would like to know is it possible to pass a request from one wsdl to another wsdl using switchyard. Here is the diagram for it :

             

            Capture.PNG

            • 3. Re: Expose an existing wsdl in Switchyard
              tungtd

              Hi Amit,

              "Since these wsdls are country specific so the same parameter might have different names coz of different language of the countries.

              Now the purpose of all the wsdls are same so it should point to same service. So I want to expose multiple existing wsdls pointing to the same service."

              If I don't misunderstand your requirements, I think it simple and you can have many bindings for a single Composite's service as possible.

              Capture.PNG

               

              As you can see I have 2 SOAP bindings for a Composite service name KS_Hello.

               

              "Also I would like to know is it possible to pass a request from one wsdl to another wsdl using switchyard. Here is the diagram for it"

              For this, if you take a look at the User Guide - SwitchYard - Project Documentation Editor of Switchyard you'll easily find out that a service (both composite service and component service) can have 1 in 3 types: WSDL, Java, ESB. But I'm not sure you can wire 2 components which have different WSDL interfaces. If it's not possible, you can use camel component instead of a XSLT as you expected.

              1 of 1 people found this helpful
              • 4. Re: Expose an existing wsdl in Switchyard
                amit4497

                Hi Tran,

                 

                I found a link which show how to wire 2 components with different wsdls : Here is the link

                 

                quickstarts/soap-binding-rpc at master · jboss-switchyard/quickstarts · GitHub

                 

                But the problem is I want to expose the external wsdl to the outer world and the link tells that the external wsdl can be configured using Composite Reference.

                As per my understanding Composite reference allows us to be wired to a service outside the application, however in my case I just need the reverse way.

                 

                In my switchyard.xml I want :

                 

                     External Wsdl ---> Component ---> internal wsdl

                 

                Is it possible or not ?

                • 5. Re: Re: Expose an existing wsdl in Switchyard
                  kcbabo

                  What you are really looking for is transformation/adaptation of a service contract between services which is something we don't support today.  If there is only one operation in the WSDL, then you could probably get by with using one interface (the generic/internal one) for the component service and then promoting that multiple times to a composite service with a different WSDL.  This should work because there's some internal routing logic which will automatically bind an operation if there's only one in the provider's contract.  If there are multiples, this won't work.  In general, it's not a great approach though.

                   

                  Another way to go about this would be to have one component service per external WSDL.  The component services would be very lightweight and they would share the same contract as the external WSDL used in the composite service.  The job of these component services would be to receive a message and then pass it along to the internal service with the generic contract.  Here's a picture of what that would look like:

                   

                  multiwsdl.jpg

                  • 6. Re: Expose an existing wsdl in Switchyard
                    amit4497

                    Hi Keith,

                     

                    I get it whatever you are suggesting me and I believe that is the best option. But still the issue is how do I expose the external wsdl which I already have.

                    Once I am able to expose the existing wsdl then I can follow your instructions easily.

                    So could you please help me in exposing a wsdl which I already have.

                     

                    Thanks in advance!!!

                    Amit

                    • 7. Re: Expose an existing wsdl in Switchyard
                      kcbabo

                      You can configure a SOAP binding on a composite service with any WSDL you want.  You might find our labs helpful in understanding how SY works:

                      jboss-switchyard/learning · GitHub