BizTalk Server Tools - Follow up - Merging two messages

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Tools > August 2005 > Follow up - 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 Follow up - Merging two messages
Yossi Dahan

2005-07-23, 5:48 pm

Ok, after quite a lot of struggling I've managed to accomplish this using a
map. I'm still hoping to get some insight from you guys out there, to see if
there are any better approached.

Basically I've linked the first part to the result as you would do, and then
used an inline xslt script to lookup the price from the second part.

I'll need to check how this performs with large documents, but at least its
working.

Two quick quesions on the xml side of things -
Is there a way to use xpath in the xslt script using namespaces? (I've kept
using the local-name() and namespace-uri() xslt functions)
and while on this - is there a difference in performance between the two? my
guess is that this result in exactly the same behaviour...

Thanks

Yossi Dahan


"Yossi Dahan" <yossi.dahan@sabratech.co.uk> wrote in message
news:O5nMOE5jFHA.3568@tk2msftngp13.phx.gbl...
> 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
>



Marc Jennings

2005-08-19, 5:52 pm

Hi Yossi,

I am trying to acomplish a very similar thing to your original
problem, but I can't get the inline xslt to work properly. Could you
post some of your transform here for me to look at, please?

Thanks
Marc.

On Sat, 23 Jul 2005 18:12:32 +0100, "Yossi Dahan"
<yossi.dahan@sabratech.co.uk> wrote:

>Ok, after quite a lot of struggling I've managed to accomplish this using a
>map. I'm still hoping to get some insight from you guys out there, to see if
>there are any better approached.
>
>Basically I've linked the first part to the result as you would do, and then
>used an inline xslt script to lookup the price from the second part.
>
>I'll need to check how this performs with large documents, but at least its
>working.
>
>Two quick quesions on the xml side of things -
>Is there a way to use xpath in the xslt script using namespaces? (I've kept
>using the local-name() and namespace-uri() xslt functions)
>and while on this - is there a difference in performance between the two? my
>guess is that this result in exactly the same behaviour...
>
>Thanks
>
>Yossi Dahan
>
>
>"Yossi Dahan" <yossi.dahan@sabratech.co.uk> wrote in message
>news:O5nMOE5jFHA.3568@tk2msftngp13.phx.gbl...
>


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com