Welcome to MSDN Blogs Sign in | Join | Help

Message Framing, Part 3

Past entries that you should have read by now:

The next record at the start of every legal exchange in the framing format is a message encoding record. The message encoding specifies how the message envelope should be translated and processed. There are actually two different ways of expressing the message encoder, each with its own record type.

The message encodings that come with the platform- text, binary, and MTOM- are called the known encodings. A known encoding record starts with the byte 3 followed by a byte for the known encoding. The known encodings are basically an enumeration of encodings that the system knows about by default.

  • 0- SOAP 1.1 with UTF8
  • 1- SOAP 1.1 with UTF16
  • 2- SOAP 1.1 with little-endian Unicode
  • 3- SOAP 1.2 with UTF8
  • 4- SOAP 1.2 with UTF16
  • 5- SOAP 1.2 with little-endian Unicode
  • 6- SOAP 1.2 with MTOM
  • 7- SOAP 1.2 with the .Net binary encoding
  • 8- SOAP 1.2 with the .Net binary encoding (and some extra dictionary options)

The first six options correspond to the text message encoder together with either SOAP 1.1 or SOAP 1.2. The next option corresponds to the MTOM message encoder. The last two options correspond to the binary message encoder. The dictionary options determine whether the binary encoding is stateful or stateless. Stateful encoders are used with sessions to progressively encode multiple messages.

It's not a problem if the encoding you want to use isn't one of these predefined formats. You can define your own encodings, assuming that both sides of the connection are able to process the format you've come up with. An extensible encoding record starts with the byte 4 followed by the size of the encoding string and followed by the encoding string itself. The encoding string is a MIME content type that you use to distinguish the encoder configuration. The size is encoded in the same way as before.

Published Thursday, January 22, 2009 5:00 AM by Nicholas Allen
Filed under: , ,

Comments

# kennyw.com » Blog Archive » Dr. Nick on Message Framing

# New and Notable 284

It's snowing again. Like every other time in Southern-most NJ (near Philly) if it accumulates more than an inch, I will be astonished. Very unlike where we used to live in New Hampshire, where for 2 years, they have at least weekly snow storms of 8 or

Friday, June 12, 2009 11:02 AM by geff zhang

# WCF 消息帧格式

在TCP/IP协议栈中,当数据通过协议栈向下流动时,每一层都要给数据增加控制信息用于确保正确的传递。控制信息放置在被传送数据的开始,称之为包头,这种在协议栈中每一层都增加传递信息的过程称为封装。也就是...

New Comments to this post are disabled
 
Page view tracker