[英]Is the Content-Type charset not exposed from HttpResponseMessage?
[英]Remove charset from content-type in WSO2 ESB
我得到了一个 RESTful 服务,我需要调用它
Content-Type: application/xml
问题是 WSO2 ESB 会自动添加一个字符集:
Content-Type: application/xml; charset=UTF-8
服务不支持
在 WSO2 ESB 中,通过以下方式调用服务:
<header action="set"
expression="get-property('PhysicalAddress')" name="To"/>
<property action="set" name="HTTP_METHOD" scope="axis2"
type="STRING" value="PUT"/>
<property action="set"
expression="concat('Basic ', base64Encode(concat(get-property('LOGIN'),':',get-property('PASSWORD'))))"
name="Authorization" scope="transport" type="STRING"/>
<property action="set" name="messageType" scope="axis2"
type="STRING" value="application/xml"/>
<call>
<endpoint>
<default format="rest">
<timeout>
<duration>120000</duration>
<responseAction>fault</responseAction>
</timeout>
</default>
</endpoint>
</call>
如何从 Content-Type 标头中删除字符集?
谢谢
<property name="setCharacterEncoding" value="false" scope="axis2" />
<property name="setCharacterEncoding" value="false" scope="axis2" type="STRING"/>
将属性setCharacterEncoding
设置为false
。
您可以使用以下属性并更改 ContentType 标头
<property name="ContentType" value="application/xml" scope="axis2" type="STRING"/>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.