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
HttpRouter
action inJBoss ESB
and capture the response received from the endpoint and display it to the browser from where the request message is sent to theESB
application. However there seems to be something wrong with the encoding in theHTTP-Response
received viaHttpRouter
action. - For example
ä
is displayed instead ofä
orü
is displayed instead ofü
. - If the
REST
endpoint is sent with the same request directly then everything works fine. The problem only occurs
if user makes aHTTP
Request throughHttpRouter
of theESB
application. - The issue also persists if user takes help of
ESB
'sHttpResponse
API [1] to set the propertiesContentType
andEncoding
manually for the outgoingHTTP Response
messages (which theESB service
is delivering to the client) , by implementing the suggested code in a customESB action class
in 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, tools, and much more.