BizTalk 2006, MSMQ and BizTalk 2002

Link. April 28, 2008. Comments [0]. Posted in: BizTalk

A little over a year ago I posted an entry about a new feature included in the MSMQ Send Adapter in BizTalk 2006 which provided a way to send messages through MSMQ from BizTalk to legacy applications that required the message contents to be formatted using the ActiveXFormatter, or that simply used the old COM-based MSMQ API.

However, I didn't mentioned anything about how to enable the opposite scenario: How to receive and parse a text message in BizTalk 2006 coming from one of those legacy applications. Someone recently asked about this on the BizTalk Newsgroup and, as It turns out, BizTalk Server 2002 happens to fall in this category as well.

Fortunately, this scenario is a lot simpler, if we assume that the contents of the message will be plain text (say, some string content or XML). The ActiveX message serialization rules dictate that a message with a BodyType of String will simply be serialized on the wire as a set of bytes encoded using UCS-2 (UTF-16LE), without a Byte Order Mark (BOM).

BizTalk can parse UTF-16 contents without problems, but without a BOM, the standard disassemblers can't figure out the encoding of the message on it's own.

Fortunately, most of the time you can work around this by setting the message Charset before parsing (for example using my own FixEncoding pipeline component).


Name
E-mail
(will show your gravatar icon)
Home page

Comment (Some html is allowed: a@href@title, b, blockquote@cite, em, i, strong) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Enter the code shown (prevents robots):

Live Comment Preview

About

Tomas Restrepo is co-founder of devdeo ltda. 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

devdeo logo

View my profile on LinkedIn

MVP logo

Syndicate

Ads

Links

Tag Cloud

.NET (232) Architecture (47) ASP.NET (6) BizTalk (170) Blogging (64) C++ (3) Castle (2) Commerce Server (3) Development (118) DLR (7) Enterprise Services (25) Fonts (4) Host Integration Server (1) LINQ (3) Linux (5) NHibernate (1) Personal (143) PowerShell (22) QuickCounters (4) Tools (74) Vista (38) VS Color Scheme (10) VSTO (2) WCF (64) Web Services (87) WinFX (80) Workflow (47) WPF (5) XML (21)

Statistics

Total Posts: 986
This Year: 56
This Month: 6
This Week: 0
Comments: 755

Blogroll

Post Archive

Other

Copyright © 2002-2008, Tomas Restrepo.

Powered by: newtelligence dasBlog 1.9.7174.0

Sign In