soap协议和普通的post请求有什么区别呢

发布网友

我来回答

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版本在头信息上存在差异。(红色字体部分表示不同

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

热心网友

soap协议是一个协议,post请求是请求,没有办法比较的东西。
你是想问webservice请求和post的区别吧?
WebService的请求,可以采用Get和post两种方式。Post只是Http协议的一部分,webService则是由Http协议之上发展而来,当然webservice可以支持soap协议
总体来说Webservice请求和Post请求之间有交集,但是又各有不同

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com