Proxying a REST endpoint using HttpRouter in JBoss ESB causes the response received in wrong encoded format
Issue
- The requirement is to proxy a REST endpoint URL using
HttpRouteraction inJBoss ESBand capture the response received from the endpoint and display it to the browser from where the request message is sent to theESBapplication. However there seems to be something wrong with the encoding in theHTTP-Responsereceived viaHttpRouteraction. - For example
äis displayed instead ofäorüis displayed instead ofü. - If the
RESTendpoint is sent with the same request directly then everything works fine. The problem only occurs
if user makes aHTTPRequest throughHttpRouterof theESBapplication. - The issue also persists if user takes help of
ESB'sHttpResponseAPI [1] to set the propertiesContentTypeandEncodingmanually for the outgoingHTTP Responsemessages (which theESB serviceis delivering to the client) , by implementing the suggested code in a customESB action classin the action pipeline. - How to solve this issue?
[1] HttpResponse
Environment
- Red Hat JBoss SOA Platform (SOA-P)
- 5.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
