【发布时间】:2013-12-11 08:05:35
【问题描述】:
在 java 中,如何检查 SOAP Request XML 的版本是 SOAP 1.1 还是 SOAP 1.2。
【问题讨论】:
-
你有 WSDL 文件吗?
在 java 中,如何检查 SOAP Request XML 的版本是 SOAP 1.1 还是 SOAP 1.2。
【问题讨论】:
是的,有办法做到这一点。认为以下是您的 SOAP 消息
<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 属性区分这两者。
SOAP 1.1:http://schemas.xmlsoap.org/soap/envelope/
SOAP 1.2:http://www.w3.org/2003/05/soap-envelope
所以你会发现上面的soap消息和SOAP 1.1有关。认为这会对您有所帮助。
更多详情请参阅:WSO2 library artical
【讨论】: