Skip to content

Message context format

markus-olsson edited this page May 28, 2012 · 4 revisions

Deserializing message contexts are supported through the BizTalkMessageContextReader and work has begun in the write-support branch to add serialization support.

The best documentation of the format is found within the reader code. This document is a work in progress.

Format

While no exact match has been found amongst publicly documented types it would seem that the format is a mixture of several types, structures and concepts from OLE, OAIdl.h and others.

Compression

The message context is not compressed and the data is stored in an image column in the tracking database so no fragmentation has to take place either.

Strings

Property names, namespaces and other strings seem are encoded in UTF-16 little endian.

Oddities

Decimals are stored as BSTRs, not binary as one would expect. Parsing with InvariantCulture seems to work fine.

Notes

  • OLE dates supports omitting parts of a date (ie day ---31, month, --05--, month+day --05-31, year, 1999, year+month 1999-02) but since we're deserializing to a DateTime we can't represent it. Don't know how valuable this is though. For now I'm opting for the convenience of DateTime over a custom date structure but we could potentially return DateTimes when all fields are present and revert to something else when they're not. See http://stackoverflow.com/q/277660/2114
Clone this wiki locally