Red Hat Training
A Red Hat training course is available for Red Hat JBoss Data Virtualization
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.17. 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.18. 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.19. Create Model Project
Note
Each section of the sheet has basic instructions outlining what to do at each step.Click next 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 useSOAPProj
for our project name. On the second 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 next step - once the wizard has completed. Click to advance to the next 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.20. Create SOAP Connection Profile
Click next to Launch Create SOAP Connection Profile Wizard to launch the wizard. The first page of the wizard is shown below:Figure 7.21. Create SOAP Connection Profile
The Web Services Data Source (SOAP) profile type will be selected. Enter CountryInfoConn for the profile name, then click Next. The next page of the wizard is shown below:Figure 7.22. 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 wizard. In the Cheat Sheet, you can now continue - once the wizard has completed. Click to advance to the next 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.23. Create Models from SOAP Connection
Click next to Launch the Consume SOAP Web Service Wizard to launch the wizard. The first page of the wizard is shown below:Figure 7.24. 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 Next to proceed to the next page, as shown below:Figure 7.25. 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 Next to proceed to the next page, as shown below:Figure 7.26. 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.27. 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.28. Consume SOAP Wizard
Click Finish to exit the wizard. In the Cheat Sheet, you can now continue. Click to advance to the next step.Create VDB
This section of the Cheat Sheet provides instructions for creating a VDB using the models that you created in the previous step. The Cheat Sheet section is shown below:Figure 7.29. Create VDB
Click next 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 next step.Test VDB
This final section of the Cheat Sheet provides instructions for executing the VDB created in the previous step. Click next to Launch Execute VDB Dialog to launch the wizard. Select the previously created VDB to execute it.