In java, How do I check if the version of SOAP Request XML is SOAP 1.1 or SOAP 1.2.
Indicate that a binding is bound to the SOAP 1.2 protocol. Specify an address for a SOAP endpoint. Specify the URI for the action parameter of the application/soap+xml Content-Type HTTP header value [SOAP Media] for the HTTP binding of SOAP. Define Headers that are transmitted as part of the SOAP Envelope.
The most common combination is to use SOAP with HTTP and TCP. There are different versions, 1.0, 1.1, and 1.2. Before version 1.2 SOAP stood for Simple Object Access Protocol. Since version 1.2 the protocol is simply called SOAP.
SOAP originally stood for "Simple Object Access Protocol" but version 1.2 of the standard dropped this acronym. After SOAP was first introduced, it became the underlying layer of a more complex set of web services, based on WSDL, XSD and UDDI.
The HTTP Content-Type of the SOAP request or SOAP response. The default is "text/xml".
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With