add header

This commit is contained in:
Looly 2021-04-08 12:03:23 +08:00
parent 20ed3122b9
commit 6b0b729c68
2 changed files with 10 additions and 4 deletions

View File

@ -3,7 +3,7 @@
-------------------------------------------------------------------------------------------------------------
# 5.6.3 (2021-04-06)
# 5.6.3 (2021-04-08)
### 新特性
* 【core 】 修改数字转换的实现增加按照指定端序转换pr#1492@Github
@ -16,6 +16,7 @@
* 【cache 】 使用LongAddr代替AtomicLongpr#301@Gitee
* 【cache 】 EnumUtil使用LinkedHashMappr#304@Gitee
* 【crypto 】 SymmetricCrypto支持大量数据加密解密pr#1497@Gitee
* 【http 】 SoapClient增加针对不同协议的头信息pr#305@Gitee
### Bug修复
* 【core 】 修复Validator.isUrl()传空返回trueissue#I3ETTY@Gitee

View File

@ -661,9 +661,14 @@ public class SoapClient extends HttpBase<SoapClient> {
* @return 请求的Content-Type
*/
private String getXmlContentType() {
return SoapProtocol.SOAP_1_1.equals(this.protocol) ?
CONTENT_TYPE_SOAP11_TEXT_XML.concat(this.charset.toString()) :
CONTENT_TYPE_SOAP12_SOAP_XML.concat(this.charset.toString());
switch (this.protocol){
case SOAP_1_1:
return CONTENT_TYPE_SOAP11_TEXT_XML.concat(this.charset.toString());
case SOAP_1_2:
return CONTENT_TYPE_SOAP12_SOAP_XML.concat(this.charset.toString());
default:
throw new SoapRuntimeException("Unsupported protocol: {}", this.protocol);
}
}
/**