Troubleshooting
Problem
The XML Firewall Service under the WebSphere DataPower WebGUI [Objects] supplies a feature in the [HTTP Options] tab which allows you to include the HTTP charset (UTF-8) in the response. This feature is labeled as 'HTTP Include charset in response-type'.
Symptom
Responses returning from WebSphere DataPower provide a Content Type which does not include the charset header.
Cause
The charset declaration is only included in the response messages if your response rule includes a transformation specifying the encoding.
Resolving The Problem
The WebSphere DataPower WebGUI provides an XML Firewall Service under Objects > Service Configuration. Inside the HTTP Options tab, there is an option to include the HTTP charset (UTF-8) in the response. This feature is labeled as 'HTTP Include charset in response-type'.
To assure that the XML Firewall Service includes the charset type in the response, a transformation must be supplied inside the response rule before the results action. The transformation will not require any functionality; the example below can be used as the transformation stylesheet. The response will not be modified and DataPower will include the charset header on the response.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="
http://www.w3.org/1999/XSL/Transform"version="1.0">
<xsl:output method="xml" />
<xsl:template match="/">
</xsl:template>
</xsl:stylesheet>
See also Setting HTTP Content-Type header with text/xml; charset=UTF-8.
Was this topic helpful?
Document Information
Modified date:
15 June 2018
UID
swg21395844