By Asim Saddal | Article Rating: |
|
September 29, 2012 11:00 AM EDT | Reads: |
17,273 |
The purpose of this article is to describe the steps involved in configuring Datapower services for the browser-based HTTP type requests. The commonly used methods for such requests are either the POST or GET HTTP method.
Datapower Configurations
1. For the testing purpose create a loopback pass-through XML Firewall.
2. Create a new Multi-Protocol Gateway with the following values
Input |
Values |
Name |
HTTPBrowserMPGW |
Type |
static-backend |
Response Type |
Non-XML |
Request Type |
Non-XML |
Backend URL |
<to the loopback XMLFirewall> |
3. Create a HTTP Front side handler with the following values
Input |
Values |
Name |
HTTPBrowserFSH |
Local IP Address |
<setup on one of the Ethernet Interface> |
Port |
81 |
Allow Methods and Version |
GET (and all the other default values) |
4. At the Multi-Protocol Gateway screen, click on the "Advance" tab menu and click on "Process Messages Whose Body Is Empty"
5. Click on Apply.
6. Create the httpReqType.xslt file and type the following. Upload the file on the Datapower
<xsl:stylesheet xmlns:dp="http://www.datapower.com/extensions" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" extension-element-prefixes="dp" exclude-result-prefixes="dp" version="1.1"> <xsl:variable name="reqType" select="dp:variable('var://service/protocol-method')"/> <xsl:template match="/"> <html><body> <p>HTTP request submitted using <b><xsl:copy-of select="$reqType" /> </b> method. </p> </body></html> </xsl:template> </xsl:stylesheet> |
7. On HTTPBrowserMPGW, create a new Policy and named it "HTTPBrowserPolicy"
8. Create a new "Client to Server" rule and configure Match action icon for "* " for URL (match all)
9. Assign a "Convert Query Params to XML" action to the rule (convert-http action)
10. Click "Apply Policy"
11. Create another "Server to Client" rule and configure Match action icon for "* " for URL (match all)
12. Assign a "Transform" action to the rule and assign the "httpReqType.xslt" file.
13. Click "Apply Policy" and then "Close Window". Click on "Apply" at the Multi-Protocol Gateway screen
Published September 29, 2012 Reads 17,273
Copyright © 2012 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Asim Saddal
Asim Saddal works in the Middleware (WebSphere Application Server, WebSphere Datapower, WebSphere Process Server, WebSphere VE) practice of IBM Software Services for WebSphere.
Apr. 11, 2018 04:30 AM EDT Reads: 1,241 |
By Pat Romanski ![]() Apr. 11, 2018 04:30 AM EDT Reads: 3,370 |
By Pat Romanski ![]() Apr. 11, 2018 04:15 AM EDT Reads: 5,829 |
By Yeshim Deniz ![]() Apr. 11, 2018 03:45 AM EDT Reads: 1,317 |
By Yeshim Deniz Apr. 11, 2018 02:30 AM EDT Reads: 1,848 |
By Liz McMillan ![]() Apr. 11, 2018 02:00 AM EDT Reads: 1,661 |
By Elizabeth White Apr. 11, 2018 01:30 AM EDT Reads: 1,356 |
By Liz McMillan ![]() Apr. 11, 2018 12:15 AM EDT Reads: 3,431 |
By Elizabeth White ![]() Apr. 11, 2018 12:00 AM EDT Reads: 16,768 |
By Maria C. Horton ![]() Apr. 10, 2018 10:45 PM EDT Reads: 13,048 |
By Yeshim Deniz ![]() Apr. 10, 2018 10:15 PM EDT Reads: 1,459 |
By Elizabeth White ![]() Apr. 10, 2018 07:00 PM EDT Reads: 5,508 |
By Yeshim Deniz ![]() Apr. 10, 2018 07:00 PM EDT Reads: 6,122 |
By Pat Romanski Apr. 10, 2018 02:00 PM EDT Reads: 1,688 |
By Liz McMillan ![]() Apr. 10, 2018 12:30 PM EDT Reads: 12,599 |
By Elizabeth White Apr. 10, 2018 12:30 PM EDT Reads: 1,865 |
By Liz McMillan Apr. 10, 2018 12:30 PM EDT Reads: 2,073 |
By Pat Romanski Apr. 10, 2018 12:15 PM EDT Reads: 1,583 |
By Pat Romanski Apr. 10, 2018 11:45 AM EDT Reads: 1,158 |
By Liz McMillan Apr. 10, 2018 11:00 AM EDT Reads: 1,028 |