Have you looked at the SDK example working with Envelopes in BizTalk 2004 for Flat Files and tried to get it to work with XML Documents? Well, I did and I found it a little trickier than I expected.
Key Take Home Points:
– De-Batching / Envelope Processing for XML Document must take place on the Receive Port. I have not been able to get it to work onthe Send Port, but I am still trying.
– Properties can be promoted from the Header and demoted to the single messages
– No custom pipelines are required for Receive Port Processing as long as the Root Node Name and Namespace are unique throughout your entire deployed solutions.
DOWNLOAD: Get the sample here!
Set-up is easy, just unzip the SampleEnvelopes folder and put it on your C: drive. Then, build and deploy the SampleEnvelopes project. I use early binding so the send and receive ports will be created for you.
To run the sample, drop the start messages named StartFileInbound.xml into c:\SampleEnvelopes\In_Inbound. You will get 3 messages inthe Out_Inbound folder for each start message. Also, note that the Orchestration will run 3 times. Plus, I promote and demote Header information to show how it can be passed into the single messages. If all else fails, read the ReadMe.txt file.
Take Away: Once you get the hang of XML Envelopes in BizTalk 2004 they can be a powerful tool for easy document splitting.
Very clear example thanks, but I have a slightly different structure of the XML which is causing me headaches :
In my example, the “record” node is missing
& so I can’t process my XML. Can this technique still be used.
It has been a while since I worked with Envelopes but if I remember correctly, you should still be able to split out the messages. Just set your Body XPath on the root node. This should break out all your message nodes. On the down side, it will also break out your Header node so you%u2019ll need a way to handle it.
Hope this is clean enough.
Stephen W. Thomas
Hello,
In the beginning of your post you wrote that you was not able to make the debatching working on the send pipeline (with the XMLAssembler component).
Is it always true ?