我想要构建一个ws代理,所以我使用http:入站网关。它运行得很好,但我的编码有点问题。所有响应都有内容-Type:text/平原;charset=iso-8859-1,而不是内容-Type: 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"/>提前感谢
问候
古兹曼
发布于 2015-09-04 15:36:28
这就是你从代理服务器收到的消息吗?
您可以通过向回复流添加一个header来更改传出内容类型.
<int:header-enricher>
<int:header name="Content-Type" value="text/xml;charset=utf-8" override="true"/>
</int:header-enricher>https://stackoverflow.com/questions/32400813
复制相似问题