Forum Discussion
dwwatk01_25473
Nimbostratus
Nov 10, 2009Web Service WSDL Rewrite
Hi!
I've read a few other threads describing similar problems, but cannot make those solutions work for our situation.
Here's what we have: a user is hitting a web s...
hoolio
Cirrostratus
Nov 10, 2009Hi David,
If you want to rewrite content in the HTTP response payload, you can use a blank stream profile and STREAM::expression iRule. The iRule would look something like this:
From: http://devcentral.f5.com/wiki/default.aspx/iRules/stream__expression
when HTTP_RESPONSE {
Disable the stream filter by default
STREAM::disable
Check if response type is text
if {[HTTP::header value Content-Type] contains "text"}{
Replace https://ourDNS:443/xsdURI with http://ourDNS/xsdURI
STREAM::expression "@https://ourDNS:443/xsdURI@http://ourDNS/xsdURI@"
Enable the stream filter for this response only
STREAM::enable
}
}
Some additional notes:
If any part of the string to search for has periods (https://ourDNS.example.com:443/xsdURI), you should escape them with a backslash (https://ourDNS\.example\.com:443/xsdURI).
If the server compresses responses, you should either disable compression on the server or add an HTTP_REQUEST event to remove the Accept-Encoding header to prevent server compression.
If the find/replace strings are of different length, you should create a custom HTTP profile with chunking set to rechunk and add it to the VIP so the Content-Length header will not be included in responses (with an incorrect value).
Aaron
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects