Service and client communicate to each other through Messages. So they must be agreed upon the Message version while communicating. Service may send Message as POX or may be as SOAP12.

When at service side we create a SOAP Message, we term it as Message Object Model. Essentially, we can say Message Object Model is used to create SOAP Message in WCF to communicate with client. When we create SOAP Message, we specify the Message Version and it is not amendable afterwards.

Message created using Message Object Model essentially consists of Envelope versions and Addressing version type.




MessageVersion class is inside System.ServiceModel.Channels. If you navigate to MessageVersion class you would find AddressingVersion and EnvelopeVersion there.



Different Message versions are as below


If you want you can create your own Message Version



CreateVersion is overloaded function. Either you can pass only Envelope Version or Envelope Version and Addressing Version both to create your own Message Version.

Now let us go ahead and inspect the entire Message version to find what Envelope Version and AddressingVersion type are inside a particular Message Version.


using System;
using System.ServiceModel.Channels;
namespace XML
    class Program

        static void Main(string[] args)
            MessageVersion version = MessageVersion.Default;
            Display(version ,"Default");
            version = MessageVersion.Soap11 ;
            version = MessageVersion.Soap11WSAddressing10 ;
            version = MessageVersion.Soap11WSAddressingAugust2004;
            version = MessageVersion.Soap12 ;
            version= MessageVersion.Soap12WSAddressing10;

        static void Display(MessageVersion v , string strName)
            Console.WriteLine("Addressing : " + v.Addressing.ToString());
            Console.WriteLine("Envelope : " + v.Envelope.ToString());


If you run above code you will get output as below,


If you want to create a new Message Version, you can very much do that.


If you want you can pass as input parameter only EnvelopeVersion


Note: Display is a function to print EnevelopeVesrion and AddressingVesrion. This function is created previously in above code)

If you run above code you will get output as below


I hope now you are having some idea about SOAP Message Version. In next post, we will see more on Message in WCF.

I hope this post was useful. Thanks for reading Smile


3 thoughts on “WCF SOAP Message Version

  1. Man, if you’re communicating between Windows clients or tiers SOAP is great, but it can be a pain in the ass when you’re connecting multiple client types for that data consumption. I will jump through just about any hoop possible to offer secure POX services.

    Nice write up though!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s