Tuesday, July 27, 2010

BizTalk 2006 Envelopes

I've been working on a BizTalk 2006 project lately. I was pleasantly surprised to find out that using an envelope schema for debatching is easier than I remembered from when I worked with 2004.

In my case, I had a schema whose records looked something like this:
<root>
<header>child elements omitted!</header>
<body>child elements omitted!</body>
</root>

All I did was to create 3 schemas, one for the envelope, and one each for the header and the body. The envelope schema had the Envelope property of the Schema node set to "Yes", and the Body Xpath property of the "root" node set to:

/*[local-name()='root' and namespace-uri()='']

I created the schemas for the header and the body directly from samples I made by cutting and pasting from the large message.

I then deployed the schemas, set up a receive port / location, and 2 send ports with filters to grab the messages based on the receive port and the message type. Here are the results:



I remember this being more difficult in BTS 2004, I think I created a pipeline component to make this work. I'd like to test this out, but I don't currently have access to a BTS 2004 installation.

No comments: