BizTalk Server Tools - Merging two messages

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Tools > July 2005 > Merging two messages





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Merging two messages
Yossi Dahan

2005-07-23, 5:48 pm

Hi all,

I'd appreciate your any thoughts on the following:

I'm getting into biztalk two documents describing a catalog of items.
one document contains for each item code and description and the other
document contains code and price (this is very simplified description of
course)

I need a single file containing all three fields (for the correct item of
course)

to illustrate, document 1 looks like:

<ns0:Source xmlns:ns0="http://MergeXmls.Items">
<SupplierCode>SupplierCode_0</SupplierCode>
<Items>
<Item>
<Code>Code_0</Code>
<Description>Description_0</Description>
</Item>
<Item>
<Code>Code_1</Code>
<Description>Description_1</Description>
</Item>
</Items>
</ns0:Source>

second document looks like:

<ns0:Prices xmlns:ns0="http://MergeXmls.Prices">
<Items>
<Item>
<Code>Code_0</Code>
<Price>Price_0</Price>
</Item>
<Item>
<Code>Code_1</Code>
<Price>Price_1</Price>
</Item>
</Items>
<SupplierCode>SupplierCode_0</SupplierCode>
</ns0:Prices>

and the expected result should look like:

<ns0:Catalog xmlns:ns0="http://MergeXmls.Catalog">
<Item>
<Code>Code_0</Code>
<Description>Description_0</Description>
<Price>Price_0</Price>
</Item>
<Item>
<Code>Code_1</Code>
<Description>Description_1</Description>
<Price>Price_1</Price>
</Item>
<SupplierCode>SupplierCode_0</SupplierCode>
</ns0:Catalog>

Now I have an orchestration with correlation accepting both input messages
I've considered three options to do this:
1. Using the mapper in the orchestration with two inputs (both messages)
2. Using a custom component in the orchestration to receive both message and
return the third
3. Using database - store all data from both messages and extracting the
result.

I've could not find a way to create a map that will do the job. any tips on
how this can be done will be greatly appreciated.

Custom component was very easy to write, but is very slow (and since we're
dealing with few mb in each file this become a problem)

Database should be easy to do, but again - writing a few mb to the db twice
just to read them joined sounds like an over kill.

Any ideas?

Thanks

Yossi Dahan


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com