http:inbound gateway响应上的内容类型的字符集为iso-8859-1,而不是utf-8

http:inbound gateway响应上的内容类型的字符集为iso-8859-1,而不是utf-8,utf-8,character-encoding,spring-integration,Utf 8,Character Encoding,Spring Integration,我想构建一个ws-proxy,以便使用http:inbound网关。它工作得很好,但我在编码方面遇到了一些问题。所有回复的内容类型为:文本/普通;charset=iso-8859-1,而不是内容类型:text/xml;charset=utf-8,因此当响应具有特殊字符时,它们不会正确发送 请问,你能告诉我如何配置这个吗 以下是我的流程: <int-http:inbound-gateway request-channel="channel" path="/services/route

我想构建一个ws-proxy,以便使用http:inbound网关。它工作得很好,但我在编码方面遇到了一些问题。所有回复的内容类型为:文本/普通;charset=iso-8859-1,而不是内容类型:text/xml;charset=utf-8,因此当响应具有特殊字符时,它们不会正确发送

请问,你能告诉我如何配置这个吗

以下是我的流程:

<int-http:inbound-gateway request-channel="channel"
    path="/services/router" supported-methods="POST"
    reply-channel="channel" >
    <int-http:request-mapping consumes="text/xml"
        produces="text/xml" />
</int-http:inbound-gateway>

<int:channel id="channel">
    <int:interceptors>
        <int:wire-tap channel="logger" />
    </int:interceptors>
</int:channel>

<int:logging-channel-adapter log-full-message="true" id="logger"/>

提前谢谢

问候


Guzman

这就是您从代理服务器收到的信息吗

您始终可以通过向回复流添加标题充实器来更改传出内容类型

    <int:header-enricher>
        <int:header name="Content-Type" value="text/xml;charset=utf-8" override="true"/>
    </int:header-enricher>