Transport level information does not match with SOAP Message namespace URI错误的理解
理论知识:
转自: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错误的理解的更多相关文章
- 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数据库,控制台报错:签名信息和同 ...
- 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 ...
- signer information does not match signer information of other classes in the same package
报错日志: java.lang.SecurityException: class "org.bouncycastle.asn1.ASN1ObjectIdentifier"'s si ...
- 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 ...
- infopath发布的提示“无法解析SOAP消息”(The SOAP message cannot be parsed)问题解决方案
最近发现一个列表数据过大,每次发布infopath表单提示如下错误: 后来发现一个infopath表单通过list.asmx and Formsservice.asmx来进行发布的. This err ...
- 客服端调用自定义宿主的WCF报错"没有终结点在侦听可以接受消息的http://localhost:8085/mex。这通常是由于不正确的地址或者 SOAP 操作导致的错误"的解决方案。
没有终结点在侦听可以接受消息的http://localhost:8085/mex.这通常是由于不正确的地址或者 SOAP 操作导致的错误. 这个错误是由于没有启动元数据交换终结点(MEX)导致的.在宿 ...
- HTTP message vs SOAP message
HTTP Message / SOAP Message HTTP Message ===>包括Request, Response.我们主要关注的是 HTTP Message,这样子包含的范围会更 ...
- Invalid SOAP message or SOAP version mismatch
在把过车数据上传到海康平台的时候返回: Invalid SOAP message or SOAP version mismatch 网上找了说是协议问题,但是不知道如何解决: 我用客户端是c#2.0; ...
- 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 ...
随机推荐
- more命令(转)
原文:http://www.cnblogs.com/peida/archive/2012/11/02/2750588.html more命令,功能类似 cat ,cat命令是整个文件的内容从上到下显示 ...
- UVA 357 Let Me Count The Ways(全然背包)
UVA 357 Let Me Count The Ways(全然背包) http://uva.onlinejudge.org/index.php?option=com_onlinejudge& ...
- 如何设置mysql登陆密码?
此情况用于mysql密码为空. 命令如下: Mysqladmin –uroot password root1234 Root是用户名,root1234是新设置的密码
- Memcachedclient-XMemcached使用
一. XMemcached 简单介绍 XMemcached 是一个新 java memcached client . 或许你还不知道 memcached 是什么?能够先看看这里.简单来说, Memca ...
- break的使用方法
private static void test() { for (int i = 0; i < 5; i++) { for (int j = 0; j < 5; j++) { Syst ...
- JAR,WAR,EAR区别
JAR WAR EAR 英文 Java Archive file Web Archive file Enterprise Archive file 包含内容 class.properties文件,是文 ...
- C10K——千万级并发实现的秘密:内核不是解决方案,而是问题所在!(转)
既然我们已经解决了 C10K并发连接问题,应该如何提高水平支持千万级并发连接?你可能会说不可能.不,现在系统已经在用你可能不熟悉甚至激进的方式支持千万级别的并发连接. 要知道它是如何做到的,我们首先要 ...
- 如何通过from语句调用模块的变量名?
# -*- coding: utf-8 -*- #python 27 #xiaodeng #如何通过from语句调用模块的变量名? #my.py def printer(x): print x #如何 ...
- WebView和JavaScript如何实现相互调用
WebView可以同JavaScript互相调用,因此我们可以用HTML和JavaScript来辅助编写Android应用. 示例:使用javaScript获取Android程序中的对象数据 clas ...
- HDUOJ-----1166敌兵布阵
敌兵布阵 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submis ...