1,命名空间的不同: Soap1.1的命名空间: xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/ “ Soap1.2 命名空间: xmlns:soap=http://www.w3.org/2003/05/soap-envelope“ 2,SOAP1.1版本与SOAP1.2版本在头信息上存在差异。(红色字体部分表示不同
1,命名空间的不同:
Soap1.1的命名空间:
xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/ “
Soap1.2 命名空间:
xmlns:soap="http://www.w3.org/2003/05/soap-envelope“
2,SOAP1.1版本与SOAP1.2版本在头信息上存在差异。(红色字体部分表示不同之处)
SOAP1.1的HTTP请求头:
POST /xe_cxf2.4_soap12_spring_web/ws/helloworldsoap12?wsdl HTTP/1.1
Content-Type: text/xml; charset=UTF-8
Accept: */*
SOAPAction: ""
User-Agent: Apache CXF 2.4.0
Cache-Control: no-cache
Pragma: no-cache
Host: localhost:6767
Connection: keep-alive
Content-Length: 216
SOAP1.2的HTTP请求头:
POST /xe_cxf2.4_soap12_spring_web/ws/helloworldsoap12?wsdl HTTP/1.1
Content-Type: application/soap+xml; charset=UTF-8
Accept: */*
User-Agent: Apache CXF 2.4.0
Cache-Control: no-cache
Pragma: no-cache
Host: localhost:6767
Connection: keep-alive
Content-Length: 214
3,基于SOAP1.1生成的WSDL和基于SOAP1.2生成的WSDL也不一样:
在定义Service部分差别如下:
Soap1.1是以:soap:address定义。
Soap1.2是以: soap12:address定义。-jdk1.6不支持12形式的访问。
4,在CXF中两种协议请求的方式也不一样:
4.1为content-Type:text/xm;charset=UTF-8
4.2为content-Type:application/soap+xml;charset=UTF-8