DADX Web services

The Web Services and Web Services DADX Group Configuration wizards assist you in creating Web services that access DB2 and XML data stored in DB2.

 

DB2 XML Extender

DB2 XML Extender consists of a set of stored procedures, user defined types and user defined functions that enable an application programmer to store and retrieve XML data using DB2. XML Extender uses an XML document format called Document Access Definition (DAD) to define the mapping between XML and relational data. XML Extender allows for the storage and retrieval of XML documents using one of two methods: the XML column access method, and the XML collection access method.

The XML column access method stores XML documents intact, stored as tagged data, and can optionally index the documents in side tables. The XML collection access method stores decomposed XML documents as a collection of rows in tables using traditional relational data types.

 

Document Access Definition (DAD) and Document Access Definition Extender (DADX)

The Document Access Definition (DAD) file is an XML document that provides control over the mapping of XML documents to a DB2 database for both storage and retrieval. The DADX file is an extension of the XML Extender DAD file and includes standard SQL functionality that does not use the XML Extender. DADX enables the creation of Web services that store and retrieve XML documents managed by XML Extender. A DADX file specifies how to create a Web service using a set of operations that are defined by SQL statements, and optionally DAD files. The following types of Web service operations are supported:

XML-based operations include:

An XML-based query enables you to compose XML documents from relational data. An XML document is broken down into its component parts and stored in relational tables. A mapping file, called a DAD file, creates the association between the relational data and the XML document structure. The user-defined mapping of SQL data to XML elements and attributes requires DB2 XML Extender.

SQL-based operations include:

SQL-based query allows you to send SQL statements, including stored procedure calls, to DB2 and to return the results with a default tagging. SQL-based operations do not require DB2 XML Extender since there is no user-defined mapping of SQL data to XML elements and attributes. Data is returned using only a simple mapping of SQL data types, using column names as elements.

Both XML-based and SQL-based operations are controlled by a file called a DADX. The DADX defines the operations that can be performed by the Web service.

 

DADX Web service

The following diagram illustrates the relationship between XML Extender, DAD, and DADX:

  1. The Web service client sends a request to the Web service.

  2. At run-time, the DADX run-time environment resolves the name of the DADX group, the DADX file, and any parameters required by the DADX file. The DADX group contains connection (JDBC and JNDI) and other information that is shared between DADX files within the group.

  3. If the DADX file contains a reference to a DAD file, the DAD file is loaded by the DADX run-time environment. The DAD file specifies the mapping of the XML request to the database.

  4. The DADX run-time environment locates the DADX group and DADX file, then sends the request to the database. XML Extender enables the storage and retrieval of XML data using DB2.

  5. The DADX run-time environment then returns the result as an XML document using the HTTP GET, or HTTP POST, or SOAP protocol.

Figure 1. Relationship between XML Extender, DAD, and DADX.

Figure 1 represents the relationship between XML Extender, DAD, and DADX.

 

Parent topic

Creating a Web service from a DADX file using the IBM SOAP run-time environment

 

Related Concepts

Tools for Web services development
Simple Object Access Protocol (SOAP)

Related Tasks
Developing Web services
Creating a Web service from a DADX file using the IBM SOAP run-time environment