JBoss.orgCommunity Documentation

Chapter 7. Metadata-specific Modeling

7.1. Relational Source Modeling
7.1.1. Source Function
7.2. Relational View Modeling
7.2.1. Create Materialized Views
7.3. XML Document Modeling
7.3.1. Create XML View Documents from schema
7.4. Web Services Modeling
7.4.1. Create Web Service Action
7.4.2. Web Services War Generation

This chapter discusses various features targeted at defining and managing metamodel-specific objects.

This section contains descriptions of various features related to creating and managing relational view model objects.

For any relational view table you can enable it's materialized view option by setting the Materialized property to TRUE and setting the Materialized Table reference, as shown in the figure below.


Designer includes a feature to assist in quickly creating materialized relational tables based on your existing view tables.

To create materialized views:

  • Step 1 - Right-click on one or more view tables in the Section D.2.1, “Model Explorer View” and select the Modeling > Create Materialized Views action.
  • Step 2 - In the Create Materialized View Model dialog specify or select a target relational model for your generated relational tables.

  • Step 2a - Selecting the browse '...' button displays the Relational Model Selector dialog where you select an existing relational model or specify a unique name for a new model.

  • Step 3 - Click OK to create relational tables corresponding to your selected view tables and automatically set the Materialized property to TRUE and the Materialized Table reference value to your newly generated table.

When finished your view tables will be configured with their new materialized properties and the corresponding relational tables will be shown in their package diagram.


Teiid Designer allows you to expose your VDBs via a SOAP or REST interface. JBossWS-CXF or RESTEasy wars can be generated based on models within your VDBs. This section describes these wizards in detail.

The Teiid Designer provides SOAP web service generation capabilities in the form of a JBossWS-CXF war. Once you have added your Web Service Models as described in Section 4.5, “Creating Web Service View Model” to your VDB, deployed the VDB to a running Teiid instance and created your VDB's data source, you are ready to expose the web service using the generated war.

In Teiid Designer, it is also possible to expose your VDBs over REST using a generated RESTEasy war. Also, if your target virtual model has update, insert and delete SQL defined, you can easily provide CRUD capabilities via REST. Accepted inputs into the generated REST operations are URI path parameters and/or XML/JSON. JSON is exposed over a URI that includes "json". For example, "http://{host}:{port}/{war_context}/{model_name}/resource" will accept URI path parameters and/or XML while "http://{host}:{port}/{war_context}/{model_name}/json/resource" will accept URI path parameters and/or JSON.

Once you have deployed your war file, you are ready to test it out. There are a few ways to accomplish this.

SOAP WAR Testing

REST WAR Testing