理论知识:

转自:http://wso2.com/library/articles/differentiating-between-soap-versions-looking-soap-message/

Using SOAP Namespace
Every XML message contains namespaces to properly qualify the entities within it. In SOAP 1.1 and SOAP 1.2 specifications, each had defined its own unique namespaces to define the entities belonging to those specifications. SOAP 1.1 : http://schemas.xmlsoap.org/soap/envelope/ SOAP 1.2 : http://www.w3.org/2003/05/soap-envelope This is the easiest and sometimes the only method some people use. You can look at the SOAP namespace of a SOAP message and easily determine its version. <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
.........
</soapenv:Header>
<soapenv:Body>
....
</soapenv:Body>
</soapenv:Envelope>
SOAP 1.1 message You might argue that this is the only method you need to know to differentiate two different SOAP versions. This might not be the case all the time. For example, there can be a situation where you will need to know the SOAP version even before reading the SOAP message itself. Even though the previous statement seems unusual, this is how it is when we have two different object models or two different builders for the two SOAP versions. In such situations, as a developer, you cannot afford to touch the SOAP message to find out the version. Perhaps you can cheat by temporarily recording the first few events or entities, but that might not be the best solution. In the next section, we will use transport binding rules, if available, to differentiate between the two different versions.

转自:http://wso2.com/library/559/

A: When Apache Axis2/Java receives a SOAP message, Axis2 tries to determine the SOAP version this message adheres to. This is required for the validation purposes against the correct SOAP specification. Axis2 has two basic mechanisms to identify the SOAP version.

1. Checking the namespace of the SOAP envelope. If the namespace is "http://schemas.xmlsoap.org/soap/envelope/", then it is a SOAP 1.1 message, and if the namespace is "http://www.w3.org/2003/05/soap-envelope", then it is a SOAP 1.2 message.

2.If the transport medium is HTTP, Then we check for the existance of SOAPAction HTTP Header. If the message is SOAP 1.1, then there must be a SOAPAction HTTP header. If it is a SOAP 1.2 message, then there may be a SOAPAction parameter inside the Content-type header (this parameter is not mandatory according to SOAP 1.2 specification HTTP binding)
When both the above parameters are present, Axis2 compares the outputs from those evaluations. If they do not match, then Axis2 will throw an error saying "Transport level information does not match with SOAP Message namespace URI". So if you encounter this error, check your SOAP message and HTTP headers. Applies To: Apache Axis2/Java v1.0 and higher

进一步理论说明:

转自:http://www.herongyang.com/Web-Services/Perl-SOAP-1-2-Request-Differences-SOAP-1-1-and-1-2.html

This section describes differences between a SOAP 1.1 request and SOAP 1.2 request for GetSpeech Web service provided by xmlme.com.

Remember that I goal is to use SOAP::Lite to send SOAP 1.2 request to the xmlme.com server.
Before writing the client program, let's compare the SOAP 1.1 request with the SOAP 1.2 request provided at: http://www.xmlme.com/WSShakespeare.asmx?op=GetSpeech.
SOAP 1.1 request: POST /WSShakespeare.asmx HTTP/1.1
Host: www.xmlme.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://xmlme.com/WebServices/GetSpeech" <?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetSpeech xmlns="http://xmlme.com/WebServices">
<Request>string</Request>
</GetSpeech>
</soap:Body>
</soap:Envelope> SOAP 1.2 request: POST /WSShakespeare.asmx HTTP/1.1
Host: www.xmlme.com
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length <?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<GetSpeech xmlns="http://xmlme.com/WebServices">
<Request>string</Request>
</GetSpeech>
</soap12:Body>
</soap12:Envelope>
I see 3 differences:
SOAP 1.2 uses "application/soap+xml" as Content-Type and SOAP 1.1 uses "text/xml".
SOAP 1.2 does not use SOAPAction header line.
SOAP 1.2 uses "http://www.w3.org/2003/05/soap-envelope" as the envolope namespace and SOAP 1.1 uses "http://schemas.xmlsoap.org/soap/envelope/".
Now I known where to pay attention to generate a correct SOAP 1.2 request.
Last update: 2009.

关键点:HTTP头信息里的Content-Type一定要和soap信息中的版本标识一致。

3 differences:
SOAP 1.2 uses "application/soap+xml" as Content-Type and SOAP 1.1 uses "text/xml".
SOAP 1.2 does not use SOAPAction header line.
SOAP 1.2 uses "http://www.w3.org/2003/05/soap-envelope" as the envolope namespace and SOAP 1.1 uses "http://schemas.xmlsoap.org/soap/envelope/".

Transport level information does not match with SOAP Message namespace URI错误的理解的更多相关文章

  1. JAVA+ Proxool+ SQLserver 2008 “signer information does not match signer information of other classes in the same package”

    1. Proxool+SQLserver2008(sqljdbc4.jar)集成问题最近在项目中遇到个问题:我用的是Proxool连接池,连接SQLserver2008数据库,控制台报错:签名信息和同 ...

  2. Exception in thread "main" java.lang.SecurityException: class "javax.servlet.FilterRegistration"'s signer information does not match signer information of other classes in the same package解决办法(图文详解)

    不多说,直接上干货! 问题详情 SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF ...

  3. signer information does not match signer information of other classes in the same package

    报错日志: java.lang.SecurityException: class "org.bouncycastle.asn1.ASN1ObjectIdentifier"'s si ...

  4. java.lang.SecurityException: class "javax.servlet.AsyncContext"'s signer information does not match signer information of other classes in the same package

    最近在写个Http协议的压测挡板时,遇到以下错误. 2018-03-08 10:34:07.808:INFO:oejs.Server:jetty-8.1.9.v20130131 2018-03-08 ...

  5. infopath发布的提示“无法解析SOAP消息”(The SOAP message cannot be parsed)问题解决方案

    最近发现一个列表数据过大,每次发布infopath表单提示如下错误: 后来发现一个infopath表单通过list.asmx and Formsservice.asmx来进行发布的. This err ...

  6. 客服端调用自定义宿主的WCF报错"没有终结点在侦听可以接受消息的http://localhost:8085/mex。这通常是由于不正确的地址或者 SOAP 操作导致的错误"的解决方案。

    没有终结点在侦听可以接受消息的http://localhost:8085/mex.这通常是由于不正确的地址或者 SOAP 操作导致的错误. 这个错误是由于没有启动元数据交换终结点(MEX)导致的.在宿 ...

  7. HTTP message vs SOAP message

    HTTP Message / SOAP Message HTTP Message ===>包括Request, Response.我们主要关注的是 HTTP Message,这样子包含的范围会更 ...

  8. Invalid SOAP message or SOAP version mismatch

    在把过车数据上传到海康平台的时候返回: Invalid SOAP message or SOAP version mismatch 网上找了说是协议问题,但是不知道如何解决: 我用客户端是c#2.0; ...

  9. mysql提示Column count doesn't match value count at row 1错误

    mysql提示Column count doesn't match value count at row 1错误,后来发现是由于写的SQL语句里列的数目和后面的值的数目不一致, 比如insert in ...

随机推荐

  1. Lisp分配给保护的符号…

    在进行调试时,弹出"分配给保护的符号:pf,是否进入中断循环",但似乎不会影响结果. 明经版主解译说是:给受保护的符号重新赋值了,所以有此提示,此提示仅在打开了vlide 编辑器才 ...

  2. 数据库 之 E-R实体关系模型

    E-R图也称实体-联系图(Entity Relationship Diagram),提供了表示实体类型.属性和联系的方法,用来描述现实世界的概念模型. 1.表示方法 E-R是描述现实世界概念结构模型的 ...

  3. Setsockopt选项

    讨论 Setsockopt选项 http://c.chinaitlab.com/cc/ccjq/200806/752042_3.html 总而言之,如果你肯定能一起发送多个数据集合(例如HTTP响应的 ...

  4. poj 2391 (Floyd+最大流+二分)

    题意:有n块草地,一些奶牛在草地上吃草,草地间有m条路,一些草地上有避雨点,每个避雨点能容纳的奶牛是有限的,给出通过每条路的时间,问最少需要多少时间能让所有奶牛进入一个避雨点. 两个避雨点间可以相互到 ...

  5. JavaSE入门学习17:Java面向对象之package(包)

           一Java包(package)        为了更好地组织类,Java提供了包机制,用于差别类名的命名空间.        包的作用:        A把功能类似或相关的类或接口组织在 ...

  6. 【Linux】war包的解压与压缩

    现在存在一个war包test.war(以下是在Linux上操作) 1.解压war包 jar –xvf test.war 说明:直接解压到当前文件夹,如果需要解压到指定的文件夹下,需要将test.war ...

  7. 【Linux】echo命令

    用途 echo是用于终端打印的基本命令 说明 只需要使用带双引号的文本,结合echo命令就可以将文本打印在终端. [root@localhost test]# echo "Hello Wor ...

  8. 修改wamp apache 默认端口

    目标:新配置一个虚拟主机,要求端口为8080,但要保证原来的80端口仍可用 1.修改 httpd.conf 开启vhost文件支持 2.httpd-vhosts.conf 中增加,记得把原来的内容全部 ...

  9. 导出CCS3.3数据及使用matlab处理的方法

    CCS3.3是一款DSP的集成开发环境(IDE).在做DSP开发时,为验证算法.经常须要使用matlab进行算法验证,验证算法就须要数据.因此,一种交互的方法是: 使用DSP开发板连接CCS 用CCS ...

  10. HDUOJ1086You can Solve a Geometry Problem too

    You can Solve a Geometry Problem too Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/3 ...