« Framework API inconsistency with encodin... | Main | MSMQ ActiveXFormatter, Strings and BizTa... »
I've just posted a new sample (very simple one, by the way) custom pipeline component for BizTalk Server: The FixEncodingComponent. What this sample does is allow you to tell the XmlDisassembler exactly using which encoding or Charset it should interpret the message in.
This alleviates the problem sometimes where you get an incoming XML message on which the XmlDisassembler barfs because it cannot figure out on it's own what the message's encoding is to process it. According to the BizTalk documentation, here's the rules the XmlDisassembler uses to figure out a message's encoding:
Option 2 is what the FixEncodingComponent does, since it is by far the simplest one and doesn't require fiddling around with the message stream, which is both slower and error prone. Here's how to use it:
I've included in the sample a test project that uses routing between ports and includes a test XML message encoded in IBM EBCDIC (International) encoding (the File -> Advanced Save Options command in Visual Studio is pretty helpful for this). To see the pipeline component in action, just configure the receive location with the standard XmlReceive pipeline and with the custom pipeline included in the sample and notice how one fails and how the other one works :)
About
Tomas Restrepo is co-founder of devdeo. His interests include .NET, Connected Systems, PowerShell and, lately, dynamic programming languages. More...
email: tomas@winterdom.com msn: tomasr@passport.com twitter: tomas_restrepo
Technorati Profile
Syndicate
Ads
Links
Categories
Statistics
Blogroll
Post Archive
Other
Copyright © 2002-2008, Tomas Restrepo.
Powered by: newtelligence dasBlog 1.9.7174.0