SOAP 1.2是否也支持SOAP 1.1版本?

时间:2016-08-18 14:56:48

标签: web-services soap wsdl

我在我的webservice应用程序中使用soap 1.2。 当我使用1.2命名空间和内容类型发送soap请求时:application / soap + xml我得到了成功的响应。

但是当我使用1.1命名空间和内容类型发送请求时:text / xml我得到VersionMismatch错误。

SOAP 1.1名称空间:http://schemas.xmlsoap.org/soap/envelope - Content-Type:text / xml SOAP 1.2命名空间:http://www.w3.org/2003/05/soap-envelope - Content-Type:application / soap + xml

以下是soap 1.1请求和响应消息。

1)我的应用程序是否支持SOAP 1.1版本? (因为虽然我在发送SOAP 1.1请求时使用的是SOAP 1.2,但我得到了VersionMismatch,但是错误字符串是误导性的。)

2)如果存在向后兼容性,即SOAP 1.2也支持SOAP 1.1有没有办法禁用它?

SOAP 1.1请求:

<soap:Envelopexmlns:soap="http://www.w3.org/2003/05/soap-envelope">
   <soap:Header>
   </soap:Header>
   <soap:Body>
   </soap:Body>
</soap:Envelope>

SOAP 1.1响应:

<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
   <soapenv:Body>
      <soapenv:Fault>
         <soapenv:Code>
            <soapenv:Value>soapenv:VersionMismatch</soapenv:Value>
         </soapenv:Code>
         <soapenv:Reason>
            <soapenv:Text xml:lang="en-US">Only SOAP 1.1 or SOAP 1.2 messages are supported in the system</soapenv:Text>
         </soapenv:Reason>
         <soapenv:Detail/>
      </soapenv:Fault>
   </soapenv:Body>
</soapenv:Envelope>

0 个答案:

没有答案