4 Replies Latest reply on May 15, 2014 8:23 AM by svsvenu_jboss

    WSDL first approach

    svsvenu_jboss

      I have a WSDL and the corresponding xsds ( multiple in a file system ) that i need to bring into switch yard as a bean ( or service? )  what is the best way to do it. I could be asking something that is way too obvious, sorry if i did.

       

      Venu

        • 1. Re: WSDL first approach
          trohovsky

          Hi Venu,

           

          you can simply import your resources to src/main/resources (File->Import..) and then continue with creating of a bean component, promoting of a service and adding of a SOAP binding. Checkout the bean-service quickstart quickstarts/bean-service at master · jboss-switchyard/quickstarts · GitHub. Maybe this documentation will be also useful for you: Application Basics - SwitchYard - Project Documentation Editor, SOAP - SwitchYard - Project Documentation Editor

           

          Tomas

          • 2. Re: WSDL first approach
            svsvenu_jboss

            Hi Tomas,

             

            This was a helpful response. Here is the approach i took and would like to confirm that its the standard way to do it.

             

            1. I imported the wsdl in jboss studio using File -> import and put the wsdl in resources folder

            2. Created an interface from the wsdl using 'create interface' button on the service

            3. Created a new CDI Bean that implements the interface in step 2

            4. Fleshed out the implementation of the bean with my logic

            5. Used the connector to join the service with the bean

            6. Added jaxb transformations

             

            Its working now, but wanted to confirm that approach

             

            Venu


            • 3. Re: WSDL first approach
              trohovsky

              Hi Venu,

               

              there is more ways how to achieve what you wanted. Personally, I create bean component at first and then click on "Promote Service" on a component service. Then I choose an interface,WSDL in you case, and that's it.

               

              Tomas

              • 4. Re: WSDL first approach
                svsvenu_jboss

                That was my first approach i tried but when i create a new bean, the only type of interface that i can select is Java. ( I see WSDL and ESB as options but they are greyed out). Wonder why. In addition, the interface approach has given me the option of using jaxb transformers since all the interfaces that got created were annotated with jaxb annotations, would the wsdl approach give me that option too ( assuming the greying out was a user error)

                 

                Venu