IBM Support

Troubleshooting 'HTTP Include charset in response-type' for an XML firewall

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.

[{"Product":{"code":"SSHT9H","label":"WebSphere DataPower Integration Appliance XI52"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"--","Platform":[{"code":"PF009","label":"Firmware"}],"Version":"4.0.2;5.0.0;6.0.0;6.0.1;7.0.0","Edition":"Edition Independent","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SS6L6N","label":"WebSphere DataPower XML Accelerator XA35"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Not Applicable","Platform":[{"code":"PF009","label":"Firmware"}],"Version":"3.7.3;3.7.2;3.7.1","Edition":"Edition Independent","Line of Business":{"code":"","label":""}},{"Product":{"code":"SS6L5J","label":"WebSphere DataPower XML Security Gateway XS40"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Not Applicable","Platform":[{"code":"PF009","label":"Firmware"}],"Version":"3.7.3;3.7.2;3.7.1","Edition":"Edition Independent","Line of Business":{"code":"","label":""}},{"Product":{"code":"SS6L4E","label":"WebSphere DataPower Integration Appliance XI50"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Not Applicable","Platform":[{"code":"PF009","label":"Firmware"}],"Version":"3.7.3;3.7.2;3.7.1","Edition":"Edition Independent","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
15 June 2018

UID

swg21395844