Java WebService消息格式SOAP1.1和SOAP1.2的区别

2025-03-14 05:42:10
推荐回答(1个)
回答1:

SOAP1.1和1.2发布的WebService的主要区别:
1、两者的命名空间不同。
1.1 -> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
1.2 -> xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
2、HTTP头信息上存在差异。
1.1 -> 为Content-Type: text/xml; charset=UTF-8
1.2 -> 为Content-Type: application/soap+xml;charset=UTF-8
3、发布的WSDL内容也不相同。
WSDL是Web Service的描述语言,版本不同,内容也就不尽相同了。
4、SOAP消息格式不同。
主要体现在消息格式的命名空间上。