Integrating Integrators – BizTalk, Windows Azure, Windows Workflow, and Beyond

LOOPING: How to Read unbounded source file and output multiple messages in Biztalk

BizTalk 2009

This group is for all content related to BizTalk Server 2009. This includes a forum, samples, and videos. Most of the content here also applies to other versions of BizTalk beyond 2009.

LOOPING: How to Read unbounded source file and output multiple messages in Biztalk

Answered (Verified) This question is answered

What I'm trying to acheive is to read a source file that has a Header and Detail elements.Source File. I have tried using Functoids but I get stuck as this produces one file.

<?xml version="1.0" encoding="utf-8"?>
<ProcessSalesOrder xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://oracle.e1.bssv.JP420000/types/">
<header>
<dateOrdered>01/12/2011</dateOrdered>
<dateRequested>05/12/2011</dateRequested>
<company>00200</company>
<businessUnit>M30</businessUnit>
<shipTo>3005</shipTo>
<soldTo>
<postalCode>10048</postalCode>
<addressLine3 xsi:nil="true" />
<mailingName xsi:nil="true" />
<customer>
<entityId>3001</entityId>
</customer>
</soldTo>
<detail>
<quantityOrdered>45</quantityOrdered>
<product>
<item>
<itemId>60062</itemId>
<itemDesc>Red Bicycle</itemDesc>
</item>
</product>
</detail>
<detail>
<quantityOrdered>100</quantityOrdered>
<product>
<item>
<itemId>55448</itemId>
<itemDesc>Blue Bicycle</itemDesc>
</item>
</product>
</detail>
<detail>
<quantityOrdered>120</quantityOrdered>
<product>
<item>
<itemId>77632</itemId>
<itemDesc>Green Bicycle</itemDesc>
</item>
</product>
</detail>
</header>
</ProcessSalesOrder>

 

I want to be able to produce multiple messages similar to the following;
Destination files
File 1:
<GetItemPriceAndAvailability xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://oracle.e1.bssv.JP420000/types/">
<product>
<quantityOrdered>45</quantityOrdered>
<item>
<itemId>60062</itemId>
</item>
<unitOfMeasureCodeTransaction>EA</unitOfMeasureCodeTransaction>
</product>
<businessUnit>M30</businessUnit>
<customer>
<entityId>3001</entityId>
</customer>
</GetItemPriceAndAvailability>

File2:
<GetItemPriceAndAvailability xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://oracle.e1.bssv.JP420000/types/">
<product>
<quantityOrdered>100</quantityOrdered>
<item>
<itemId>55448</itemId>
</item>
<unitOfMeasureCodeTransaction>EA</unitOfMeasureCodeTransaction>
</product>
<businessUnit>M30</businessUnit>
<customer>
<entityId>3001</entityId>
</customer>
</GetItemPriceAndAvailability>

File3:
<GetItemPriceAndAvailability xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://oracle.e1.bssv.JP420000/types/">
<product>
<quantityOrdered>120</quantityOrdered>
<item>
<itemId>77632</itemId>
</item>
<unitOfMeasureCodeTransaction>EA</unitOfMeasureCodeTransaction>
</product>
<businessUnit>M30</businessUnit>
<customer>
<entityId>3001</entityId>
</customer>
</GetItemPriceAndAvailability>

 

Verified Answer
Page 1 of 1 (2 items)