How to identify soap Request is SOAP 1.1 or SOAP 1.2

user3089869 picture user3089869 · Dec 11, 2013 · Viewed 12.1k times · Source

In java, How do I check if the version of SOAP Request XML is SOAP 1.1 or SOAP 1.2.

Answer

Malintha picture Malintha · Dec 11, 2013

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