7.5. Consume a SOAP Web Service This section shows how to consume a SOAP Web Service, using a Cheat Sheet. We will demonstrate connection to a publicly accessible web service. You can use this process as an example for modeling other web services. Open the Cheat Sheet You can access the Cheat Sheet from the Designer Menu. From the Designer main menu, select Window > Show View > Other... , then select Help > Cheat Sheets in the dialog. Alternately, you can access the Cheat Sheet from the Guide View . A sample Guide view is shown below, with the Consume a SOAP Web Service Action Set selected: Figure 7.18. Guides View To open the Cheat Sheet from the Guide View , expand the Cheat Sheet section in the lower portion of the Guide View , then select the Consume a SOAP Web Service link. Begin the Cheat Sheet The Consume a SOAP Web Service Cheat Sheet is shown below: Figure 7.19. Consume SOAP Web Service Cheat Sheet To start the Cheat Sheet process, expand the Introduction section, then select Click to Begin . The Create New Teiid Model Project section opens, as shown. Figure 7.20. Create Model Project Note Each section of the sheet has basic instructions outlining what to do at each step. Click to Launch New Teiid Model Project Wizard to launch the New Project wizard. Follow the wizard to create a new Model Project. For this example, we will use SOAPProj for our project name. On the second page is not needed any action, just click . On the third page of the wizard, select the sources and views folders. Click Finish . The new project is created. In the Cheat Sheet, you can advance to the step - once the wizard has completed. Click to advance to the step. Create SOAP Web Service Connection This section of the Cheat Sheet provides instructions for creating a connection profile for the SOAP Web Service, as shown below: Figure 7.21. Create SOAP Connection Profile Click to Launch Create SOAP Connection Profile Wizard to launch the wizard. The first page of the wizard is shown below: Figure 7.22. Create SOAP Connection Profile The Web Services Data Source (SOAP) profile type will be selected. Enter CountryInfoConn for the profile name, then click . The page of the wizard is shown below: Figure 7.23. SOAP Connection Properties The connection profile properties are entered on this page. Click the URL... button, then enter the following URL: http://www.oorsprong.org/websamples.countryinfo/CountryInfoService.wso?WSDL . Select None for SecurityType , then click OK to complete the dialog. After that, click and choose End Point. For our example choose CountryInfoServiceSoap12 and click Finish to complete wizard. In the Cheat Sheet, you can now continue - once the wizard has completed. Click to advance to the step. Create Models from SOAP Connection This section of the Cheat Sheet provides instructions for creating relational models using the previously created connection profile for the SOAP Web Service, as shown below: Figure 7.24. Create Models from SOAP Connection Click to Launch the Consume SOAP Web Service Wizard to launch the wizard. The first page of the wizard is shown below: Figure 7.25. Consume SOAP Wizard For Connection Profile , select the previously created CountryInfoConn profile. The available WSDL Operations will then be displayed under Select the desired WSDL Operations . Select only the first CapitalCity Operation for this example. Click to proceed to the page, as shown below: Figure 7.26. Consume SOAP Wizard On the Model Definition page, the source and view model info section will be pre-filled. We will keep the names and location defaults for the source and view models. Click to proceed to the page, as shown below: Figure 7.27. Consume SOAP Wizard On the Data Source Definition Options page, enter a JNDI name and click > to proceed to the page, as shown below: Figure 7.28. Consume SOAP Wizard On the Operations Type Selection page, choose Procedure Generation Options and click > to proceed to the page, as shown below: Note If the Default Procedures option is selected, the Finish button is available instead of > button. Figure 7.29. Consume SOAP Wizard On the Procedure Definition page, the CapitalCity Operation will be selected since it is the only one used for this example. On the Request tab, select the sCountryISOCode element - then click the Add button. This will add the selected element to the request. Now select the Response tab, as shown below: Figure 7.30. Consume SOAP Wizard On the Response tab, select the Body sub-tab. In the Schema Contents , select the CapitalCityResult , and then click the Add button. This will add the selected element to the response. Select the Wrapper Procedure tab to see the full Generated Procedure SQL, as shown below. Figure 7.31. Consume SOAP Wizard Click Finish to exit the wizard. In the Cheat Sheet, you can now continue. Click to advance to the step. Create VDB This section of the Cheat Sheet provides instructions for creating a VDB using the models that you created in the step. The Cheat Sheet section is shown below: Figure 7.32. Create VDB Click to Launch New VDB Wizard to launch the wizard. Follow the steps to create a VDB in your workspace. When complete, exit the wizard. In the Cheat Sheet, you can now continue. Click to advance to the step. Test VDB This final section of the Cheat Sheet provides instructions for executing the VDB created in the step. Click to Launch Execute VDB Dialog to launch the wizard. Select the previously created VDB to execute it.

Commands: