Testing, Tools, Web Service Testing

How to identify SOAP version in a message?

In this blog post, let us see about how to identify Simple Object Access Protocol (SOAP) version in a message. Sometimes, you will be skeptical about the version of your SOAP version in a message. There are two versions of SOAP being widely used: SOAP 1.1 and SOAP 1.2.

Identify SOAP Version

Method 1: Using Namespaces

By checking the namespaces in the message helps you to identify the SOAP version. Below are the specifications.

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

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

Below is the sample xml message which has the envelope http://schemas.xmlsoap.org/soap/envelope/ which is SOAP 1.1 version.

<?xml version="1.0" encoding="UTF-8"?>

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


    <listUsers xmlns="http://ejb3.examples.itko.com/" />



Method 2: SOAP Action Header

Typically SOAP 1.1 will have the content type as text/xml. Below is the sample header information.

POST /YourService HTTP/1.1

Content-Type: text/xml; charset="utf-8"

Content-Length: xxx

SOAPAction: "urn:uuid:youraction"

But SOAP 1.2 will have the content type as application/soap+xml. Below is the sample header information.

Method 3: Fault Information

  • Names of the fault elements will look different.
  • SOAP 1.1 fault elements are not namespace qualified, but all the SOAP 1.2 elements are namespace qualified.
  • SOAP 1.1 uses the lower case letters in the fault elements.
  • SOAP 1.2 Code elements can have the sub codes within it that describe the SOAP fault hierarchy.

Visit these links for more details: http://www.w3.org/TR/2000/NOTE-SOAP-20000508/ and http://www.w3.org/TR/soap12-part1/#firstexample

Once a week we send a digest with the most popular articles.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

New Year. New Hope. Learn TruWeb. 78% OFF for Limited Time of my Udemy course..BUY NOW