Most Read This Week
WebSphere Datapower Configuration for Database
Construct Database Query from Requests URI
By: Asim Saddal
Apr. 4, 2014 03:20 PM
The purpose of this article is to describe the steps involve to configure Datapower service for the Database communication. The service will parse the incoming parameters from the request, construct a SQL query string and returns the data from the Database, based on the constructed query.
1. In the Datapower, create SQL Data Source with the following values
2. Create the GallagherDirectoryQuery.xslt file and type the following. Upload the file on the Datapower
3. Create a new Multi-Protocol Gateway with the following values
4. Create a HTTP Front side handler with the following values
5. At the Multi-Protocol Gateway screen, click on the "Advance" tab menu and click on "Process Messages Whose Body Is Empty"
6. Click on Apply.
7. On RESTDemoMPGW, create a new Policy and named it "RESTDEmoPolicy"
8. Create a new "Client to Server" rule and configure Match action icon for "* " for URL (match all)
9. Assign a "Transform" action to the rule and assign the "GallagherDirectoryQuery.xslt" file.
10. Drag the "Advanced" action to the rule and select "SET Variable". Set the following variable
11. Click "Apply Policy" and then "Close Window". Click on "Apply" at the Multi-Protocol Gateway screen.
12. Save configurations.
1. From the SOAPUI, send the following request to the MPGW
2. The successful query with the condition "Id=2" and "Name=T*" will send the data back from database.
3. From the SOAPUI, send another following request to the MPGW
4. The successful query with the condition "Id=1", "Name=K*" and "Division=C*" will send the data back from database.
Subscribe to the World's Most Powerful Newsletters
Today's Top Reads