A SERVICE OF

logo

Virtuoso 4.5 Application and Integration Reviewers Guide
Copyright ©2006 OpenLink Software
15
3.3.1.3 Exercising Published Services
3.3.2 Web Services Composition from other Application Logic
Sources
Business logic written in Java or any of the Microsoft .Net languages can be hosted inside
the Virtuoso process. This business logic can access Virtuoso's database and virtual
database capabilities directly via an in-process client. This eliminates the gap between
the application and database tiers in a three-tier architecture.
If structures of the hosted language are to be transferred, they will first be mapped to a
SQL type, which then declares the precise SOAP types for the members
User Defined Types
To Virtuoso SQL, instances of hosted classes appear just as native SQL user-defined type
instances or types (UDTs). Their methods can be called, their members can be accessed
and the instances may be stored into columns of relational tables.
These user-definable datatypes can be based on any hosted language or class and can be
used to define database table columns.
The following code fragment shows how to define a SQL user-defined type, which shows
the basic syntax used for the CREATE TYPE. Refer to the User Defined Types and
Create Type Syntax CREATE TYPE in the Virtuoso Guide for complete details on syntax.
Step 1. Using ISQL as shown in Figure 13 – SQL Create Type Syntax, Type in the
following syntax for the User Defined Type and click the Execute button.
Note 2 - By default if you do not specify the language the create type automatically defaults to SQL.
Figure 13 – SQL Create Type Syntax
CREATE TYPE DEMO..AUDIO_CASSETTE AS (AUDIO_CASSETTE LONG VARCHAR);
Step 2. One the UDT has been defined, verify the UDT by navigating to the Database
TAB, selecting Schema Objects and expanding the Demo database and
selecting the User Defined Types as show below in Figure 14 – Demo
AUDIO_CASSETTE User Defined Type.