I ran into a strange issue the other day with BizTalk Server 2006 R2. Imagine a map (.btm file) that takes multiple messages as its input. Imagine two of those messages being of the same document type, having the same schema. Now... make the first message be normal, like this (this is an excerpt from the full multipart input message to the map):
<InputMessagePart_2>
<ns4:stock_warehouse_fetch_response xmlns:ns4="http://StockWarehouse">
<ns4:stock_warehouse stock_warehouse_id="170A9532-BD20-11DD-85B6-3DFC55D89593"
company_id="1EBB0C44-BD20-11DD-9025-69FC55D89593"
[... More attributes existed but have been removed to preserve
the integrity of the customer ] />
</ns4:stock_warehouse_fetch_response>
</InputMessagePart_2>
<InputMessagePart_3>
<ns4:stock_warehouse_fetch_response xmlns:ns4="http://StockWarehouse">
<!-- This is the part that causes the problems -->
</ns4:stock_warehouse_fetch_response>
</InputMessagePart_3>
When I used the message above (with more messages in the multipart message and so forth), a very weird thing occured: the map output was completely empty, the only thing that remained was the root node! Obviously, many of the input elements existed in the input messages, so this is clearly a bug in BizTalk (IMO). The problem first occured when running the application in BizTalk Server 2006 R2, but was reproduced with the Visual Studio-integrated "test map" function.
The solution? Add a "content node" in the document, like below. It seems like BizTalk really, really dislikes documents with only a root node. There must be at least one content node in all the input documents to a map. Otherwise, the map output is completely eradicated, except for the root node.
<InputMessagePart_3>
<ns4:stock_warehouse_fetch_response xmlns:ns4="http://StockWarehouse">
<ns4:stock_warehouse></ns4:stock_warehouse>
</ns4:stock_warehouse_fetch_response>
</InputMessagePart_3>
Well, that's it for this time. I hope this helped you, it would have helped me. 