【发布时间】:2013-01-04 14:36:18
【问题描述】:
在文档中,属性 CONTENT_TYPE 是:
In situations where the ESB is receiving HTTP response messages without the Content-type header, this property can be used to specify a default content type to be used. If no such content type is specified for responses the ESB will default to 'application/octet-stream'.
我有一个没有 Content-type 的 HTTP 测试服务响应消息,所以我在 ESB 配置中设置了属性 CONTENT_TYPE="text/plain"。回应是:
<axis2ns3:binary xmlns:axis2ns3="http://ws.apache.org/commons/ns/payload">UmV0dXJuQ29kZT0wMDAwMDANCg==</axis2ns3:binary>
如果我在我的 HTTP 测试服务中添加resp.setContentType("text/plain"),响应是:
<text xmlns="http://ws.apache.org/commons/ns/payload">ReturnCode=000000</text>
似乎上面的属性 CONTENT_TYPE 设置没有用,仍然默认为 'application/octet-stream'。
我有一个没有 Content-type 标头的 HTTP 服务,然后响应消息是二进制的。如何设置响应 CONTENT_TYPE="text/plain"?任何人都可以帮助我吗?非常感谢。
【问题讨论】:
-
你能发布你用来设置内容类型的 ESB 配置吗?
标签: properties wso2 esb