9.9. Import WSDL into Relational Models 9.9.1. Import WSDL into Relational Models You can turn your WSDL file (local or URL) into a queryable relational procedures that represent your desired request and response web service structure defined through your WSDL's schema definition. You can access this wizard by clicking Import... action and then selecting the Teiid Designer > Web Service Source >> Source and View Model (SOAP) option. Web Services Connection Profile is defined by a WSDL file in your workspace or defined by a URL. Designer will interpret the WSDL, locate any associated or dependent XML schema files, generate a physical model to invoke the service, and generate virtual models containing procedures to build and parse the XML declared as the service messages. To create relational models from WSDL use the steps below. In Model Explorer, right-click and then click Import... or click the File > Import... action in the toolbar or select a project, folder or model in the tree and click Import... Select the import option Teiid Designer > Web Service Source >> Source and View Model (SOAP) and click > . On the page select an existing Web Service Connection Profile from the list, or click the New button to create a new profile. Figure 9.37. WSDL Source Selection Select individual Web Service Operations to model. The default behavior of this page selects all available operations in the tree. Operations can be deselected if they are not being modeled. The Selection Details panel displays static information about the operation such as the names of the input and output messages, and faults thrown by the operation. Click > . The page entitled Model Definition requires both a model location (i.e. folder or project) and a valid model name for both source and view models. Use the Browse... button to select existing folders or models. Click > when all the information is defined. Figure 9.38. WSDL Source Selection On the page enter the JNDI name and click > . On the page choose whether the User-specified Procedures or Default Procedures should be created and click > . Note If the Default Procedures option is selected, the Finish button is available instead of > button. This wizard generates both request and response procedures that are used in the queryable wrapped procedure. The page, Procedure Definition , provides the means to define the details of your request and response structures. In the Request tab, select and double-click the schema elements you wish to be input parameters for your request. These will be added to the Element Info panel and the resulting generated SQL statement will be updated to reflect the new element. Note the BODY and HEADER tabs which exist on both the Request and Response tabs. If the selected service mode for this procedure is set to MESSAGE, the HEADER tab will be enabled and allow you to define the SOAP header variables utilizing the same schema tree. Select the Response tab and create the response procedures result set columns in the same way. Repeat this process for all operations by changing the selection target operation via the Operations selector at the top. Figure 9.39. Procedure Definition Page Click Finish . After generation the new models can be found in the specified location in your workspace. In the Model Explorer you can see the importer created the following a single physical model containing a single procedure called invoke. This model and procedure correspond to the single port declared in the WSDL. A single view model was also created containing your new procedures named after the operations declared in the WSDL. For each operation a wrapper procedure was created which can be previewed in Teiid Designer. 9.9.2. Circular References in WSDL Schemas It is possible for a WSDL schema to either contain a very deep set of XML type references or indeed for such references to be circular. This is legal in the WSDL schema but can make processing the schema in Teiid Designer difficult. If left unchecked such circular references can result in a JVM StackOverFlow exception and exiting of the application. To mitigate this possibility a depth limit of 750 references has been introduced. Should the depth exceed this limit then a warning is displayed and further processing of that fragment of the schema will end. It may be the case that the reference in question is not circular but just very deep so in such a case it is possible to increase the depth limit by setting the JVM property WsdlSchemaHandlerRecursiveDepth to a larger value, for example, -D WsdlSchemaHandlerRecursiveDepth=800 . This should only be used with caution as on some systems it is possible the JVM throws a StackOverFlow exception before the new depth limit is reached. Figure 9.40. Warning message displayed if depth limit has been reached

Commands: