简体   繁体   中英

How to identify soap Request is SOAP 1.1 or SOAP 1.2

在java中,如何检查SOAP Request XML的版本是SOAP 1.1还是SOAP 1.2。

Yes there is a way to do this.Think following is your SOAP message

<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>

You can distinguish these two using soapenv property.

SOAP 1.1 : http://schemas.xmlsoap.org/soap/envelope/

SOAP 1.2 : http://www.w3.org/2003/05/soap-envelope

So you will find that the above soap message is related to SOAP 1.1. Think this will be helpful to you.

for more details see : WSO2 library artical on this

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM