9.10. Import WSDL Into Web Service 9.10.1. Import WSDL Into Web Service You can create a Web Service model by selecting a WSDL file in your workspace, importing WSDL files from the file system or by defining a URL. The Teiid Designer will interpret the WSDL, locate any associated or dependent XML Schema files, generate an XML View of the schema components and create a Web Service model representing the interfaces and operations defined in the WSDL. There are three options for selecting the WSDL for your Web Service generation: Workspace Location File System Location URL Detailed steps for each of these options is described below, as well as a description of how the wizard handles WSDL errors. 9.10.2. Import WSDL from Workspace Location You can create a Web Service model by selecting a WSDL file from your workspace. Click the File > Import... action in the toolbar or select a project, folder or model in the Model Explorer's tree, right-click and choose Import... Select the import option Teiid Designer > WSDL File or URL >> Web Service Model option and click > . Enter a valid name for your Web Service model and click the Workspace... button. Locate your workspace WSDL file in the selection dialog and click OK> . Click > to continue. Figure 9.41. WSDL File Selection Dialog Figure 9.42. WSDL File Workspace Selection Dialog Note If no WSDL is selected or specified then the importer will only create an empty Web Service model. No XML Schema or XML View models will be generated. Any referenced files (WSDLs or schemas) must either be embedded in the WSDL file or exist on your file system. The page is titled Namespace Resolution . This page identifies successful and errant WSDL namespace resolution. The main WSDL document will essentially always be resolved, since the workspace file chooser is used to obtain the path. Problems will occur when the main WSDL file imports other WSDL files that cannot be resolved. If no errors, click to proceed, or Finish (if enabled) to complete with default options. Figure 9.43. Namespace Resolution Dialog The page WSDL Operations Selection allows customizing the resulting content of your Web Service model by selecting/deselecting various operations and interfaces in the following dialog. Figure 9.44. Namespace Resolution Dialog The page is titled Schema Workspace Location Selection . This page lists all schemas imported by the WSDL (along with any dependent schemas referenced within schemas) as well as schemas embedded in the WSDL and indicates whether or not they are resolvable. All resolved schemas will be created in a separate file and added to the workspace. The editor panel allows you to change the default file name of the new schema file(s). If no errors, click to proceed, or Finish to complete with default option. Figure 9.45. Namespace Resolution Dialog The last page titled XML Model Generation allows you to change the name of the XML View model if the Generate virtual XML document model is checked. Enter desired name or use the default name provide. Click Finish to complete. Figure 9.46. Namespace Resolution Dialog In order to successfully generate Web Services from WSDL, the WSDL must be error free. WSDL validation is performed during Step 3 above. If errors do exist, a error summary dialog will be displayed (shown below) and you will not be able to finish the wizard until the WSDL problems are fixed or you re-import and select a valid WSDL file. Figure 9.47. WSDL Validation Problems Dialog 9.10.3. Import WSDL from File System Location You can create a Web Service model by selecting a WSDL file from your local file system. Click the File > Import... action in the toolbar or select a project, folder or model in the Model Explorer's tree, right-click and choose Import... Select the import option Teiid Designer > WSDL File or URL >> Web Service Model and click > . Input a valid name for your Web Service model and click the File System... button. Locate your file system WSDL file in the selection dialog and click OK> . Figure 9.48. WSDL File Selection Dialog Note If no WSDL is selected or specified then the importer will only create an empty Web Service model. No XML Schema or XML View models will be generated. Any referenced files (WSDLs or schemas) must either be embedded in the WSDL file or exist on your file system. The page is titled Namespace Resolution . This page identifies successful and errant WSDL namespace resolution. The main WSDL document will essentially always be resolved, since the workspace file chooser is used to obtain the path. Problems will occur when the main WSDL file imports other WSDL files that cannot be resolved. If no errors, click to proceed, or Finish (if enabled) to complete with default options. Figure 9.49. Namespace Resolution Dialog The page WSDL Operations Selection allows customizing the resulting content of your Web Service model by selecting/deselecting various operations and interfaces in the following dialog. Figure 9.50. Namespace Resolution Dialog The page is titled Schema Workspace Location Selection . This page lists all schemas imported by the WSDL (along with any dependent schemas referenced within schemas) as well as schemas embedded in the WSDL and indicates whether or not they are resolvable. All resolved schemas will be created in a separate file and added to the workspace. The editor panel allows you to change the default file name of the new schema file(s). If no errors, click to proceed, or Finish to complete with default option. Figure 9.51. Namespace Resolution Dialog The last page titled XML Model Generation allows you to change the name of the XML View model if the Generate virtual XML document model is selected. Enter the desired name or use the default name provided. Click Finish to complete. Figure 9.52. Namespace Resolution Dialog In order to successfully generate Web Services from WSDL, the WSDL must be error free. WSDL validation is performed during Step 3 above. If errors do exist, a error summary dialog will be displayed (shown below) and you will not be able to finish the wizard until the WSDL problems are fixed or you re-import and select a valid WSDL file. Figure 9.53. WSDL Validation Problems Dialog 9.10.4. Import WSDL from URL You can create a Web Service model by selecting a WSDL file based on a URL. Click the File > Import... action in the toolbar or select a project, folder or model in the Model Explorer's tree, right-click and choose Import... Click the import option Teiid Designer > WSDL File or URL >> Web Service Model and click > . Input a valid name for your Web Service model and click the URL... button. Enter a valid WSDL URL. If the URL cannot be validated then an error will be displayed after clicking the OK> button. If the WSDL is protected by basic HTTP authentication then this option should be selected and the appropriate username and password entered. Click OK> to continue. Click > to continue. Figure 9.54. WSDL URL Dialog Note If no WSDL is selected or specified then the importer will only create an empty Web Service model. No XML Schema or XML View models will be generated. Any referenced files (WSDLs or schemas) must either be embedded in the WSDL file or exist on your file system. The page is titled Namespace Resolution . This page identifies successful and errant WSDL namespace resolution. The main WSDL document will essentially always be resolved, since the workspace file chooser is used to obtain the path. Problems will occur when the main WSDL file imports other WSDL files that cannot be resolved. If no errors, click to proceed, or Finish (if enabled) to complete with default options. Figure 9.55. Namespace Resolution Dialog The page WSDL Operations Selection allows customizing the resulting content of your Web Service model by selecting/deselecting various operations and interfaces in the following dialog. Figure 9.56. Namespace Resolution Dialog The page is titled Schema Workspace Location Selection . This page lists all schemas imported by the WSDL (along with any dependent schemas referenced within schemas) as well as schemas embedded in the WSDL and indicates whether or not they are resolvable. All resolved schemas will be created in a separate file and added to the workspace. The editor panel allows you to change the default file name of the new schema file(s). If no errors, click to proceed, or Finish to complete with default option. Figure 9.57. Namespace Resolution Dialog The last page titled XML Model Generation allows you to change the name of the XML View model if the Generate virtual XML document model is checked. Enter desired name or use the default name provide. Click Finish to complete. Figure 9.58. Namespace Resolution Dialog In order to successfully generate Web Services from WSDL, the WSDL must be error free. WSDL validation is performed during Step 3 above. If errors do exist, a error summary dialog will be displayed (shown below) and you will not be able to finish the wizard until the WSDL problems are fixed or you re-import and select a valid WSDL file. Figure 9.59. WSDL Validation Problems Dialog

Commands: