The article is about debatching multiple message types using Envelope schema. The feature given by BizTalk to debatch message using envelope schema does not limit only for same message type, we can configure multiple message types to be debatched.

Steps to Debatch multiple Message types

1. Creating a schema A

2. Creating schema B

3. Creating the Envelope schema and importing the schema's A and B into Envelope schema AB.

Set the Envelope property of the AB schema to true.

4. Setting the appropriate envelope debatching properties.

Set the Body XPATH property of the Root node of the schema to AB. Setting this property will indicate that any records below AB will get debatched.

5. Creating records for schema A and B in AB

Inside AB record, create a new record and assign the Data Structure Type property of that record to RootA. Similarly, create a new record and assign data structure type property to RootB. Automatically the records of schema A and B will be created.

6. Generating the envelope schema instance.

7. Output generated.

Two files are generated for both the message types.


The main point of interest is the body XPATH record. Well, the thing is every record below the body XPATH record will get debatched irrespective of its message type.

The XML Disassembler debatches the records and tries to find the schema with MessageType equal to the Root Node + Namespace of the debatched record.
Now would it make any difference if we use an ANY element  instead of using records of schema A and schema B in the Envelope Schema?
The Answer is NO. The only thing that matters is that the schema of the debatched message should be present.

Return to Top

See Also

Another important place to find an extensive amount of BizTalk related articles is the TechNet Wiki itself. The best entry point is BizTalk Server Resources on the TechNet Wiki.