Thursday, September 15, 2011

Datapower database interaction

This is one topic which might pop up in your mind when you are trying to learn Datapower.How do I interact with the database using Datapower Appliance.?
The two most common methods to send and receive data from a database using a DataPower appliance are the SQL Action and XSL extensions.

The SQL Action

The SQL Action is added to a processing rule in the same way all other actions are specified:

sql-action.jpg

The SQL Action is found under the Advanced Action menu and is highlighted in the processing rule in Figure above. This action offers three ways to specify a query. The first is a static string directly defining the SQL or XQuery statement. Second is a query string held in a DataPower variable, likely created in preceding processing. The third is a query generated as the text output of a XSL transformation. Figure 4 shows the configuration of a SQL Action defined with a static SQL statement:

XSLT support

The ability to execute SQL queries in XSL stylesheets is available in the XI50 appliance through the dp:sql-execute() extension function. The 3.7.1 firmware release introduced the extension element, which extends the database-related capability of the appliance.