BizTalk Server General - Two Source Schemas One Destination Schema

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > April 2004 > Two Source Schemas One Destination Schema





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 Two Source Schemas One Destination Schema
Guru

2004-04-11, 4:28 pm

All

I will be getting two XML files from external application and both the files will be stored in different folders. What I need to do is that I have to take these 2 XML files and generate a single XML file. So what I did was defined 2 xml source schemas and
1 destination schema. Trying to map.

Questions are:

1) How will create a map with which should map 2 different input schemas with one single output schema

2) Can I achieve this using orchestration process? What should I do for that?

3) How will make my FILE adpater to listen to 2 differnet file locations in this case?

4) What should I do in orchestration process to bind to these different locations

Thanks in advance
srini

2004-04-11, 4:29 pm

i think it will work in Orchestration
create 2 maps.first construct message with message1 and next with message2.

let me know if you have any problems
Matt Milner

2004-04-11, 4:29 pm

In an orchestration, you can define a map with two source messages and one
output message, this will let you map many to one (you can do one to many as
well).

Two listen to two different file locations, just create two different
receive locations under the same receive port. Then in your orchestration
you will have one receive port that you will bind to this physical receive
port when you deploy.

You'll probably want to use a parallel convoy so that you receive both
documents in your orchestration before mapping and continuing ( look at
previous webcasts from Scott Woodgate that include information on convoys or
see this link for a sample:
http://www.covarity.com/downloads/TestMessaging.zip)


Matt

"Guru" <anonymous@discussions.microsoft.com> wrote in message
news:43B53088-14E5-4E29-B0E5-BC46383038E5@microsoft.com...
> All
>
> I will be getting two XML files from external application and both the

files will be stored in different folders. What I need to do is that I have
to take these 2 XML files and generate a single XML file. So what I did was
defined 2 xml source schemas and 1 destination schema. Trying to map.
>
> Questions are:
>
> 1) How will create a map with which should map 2 different input schemas

with one single output schema
>
> 2) Can I achieve this using orchestration process? What should I do for

that?
>
> 3) How will make my FILE adpater to listen to 2 differnet file locations

in this case?
>
> 4) What should I do in orchestration process to bind to these different

locations
>
> Thanks in advance



Guru

2004-04-11, 4:29 pm

Hi Matt

Thanks.

The XML files are getting created based on selection from UI application. The UI application would place the different XML's in different folders. Now, how using MAP, i can map two different schemas with the destination one. Also the destination schema al
so is not a static. It will be changing depending on the selection from the UI.

How will I achieve this using orchestration process?
Guru

2004-04-11, 4:29 pm

Matt / Srini

I tried correlation type. But i do not succeed. Can you guide me a sample that would help me in mapping two source schemas with one destination schema.

If I try Map, do I need to create 2 maps, 1 for each source? In that case, how will I map to a single destination schema?
I tried using messaging properties also. I did not succeed.

Thanks in advance

Guru

2004-04-25, 7:34 am

Any inputs on this?
Matt Milner

2004-04-25, 9:36 pm

The mapping of two schemas to one happens in the orchestration designer
doing the following:

Drop a transform shape onto the surface. Open the editor for the transform
shape and choose to create a new map.
Select two source schemas and one destination schema

Based on your other comments about the dynamic nature of your mapping, I'm
not sure you'll be able to do this. I think you are going to have to come
up with some strategy using maps in send ports or or receive ports. I'd
need to know more about the dynamic nature of the maps and what determines
which map you use.

Matt


"Guru" <anonymous@discussions.microsoft.com> wrote in message
news:AC9BAECB-EA0C-4F33-A372-5A4A0CAFDB3A@microsoft.com...
> Matt / Srini
>
> I tried correlation type. But i do not succeed. Can you guide me a sample

that would help me in mapping two source schemas with one destination
schema.
>
> If I try Map, do I need to create 2 maps, 1 for each source? In that case,

how will I map to a single destination schema?
> I tried using messaging properties also. I did not succeed.
>
> Thanks in advance
>



Christof

2004-04-26, 7:35 am

Hi,

I never did this but however I'd like to share following snippet I found
previously on this newsgroup. (Sorry for copying, just couldn't find it
here anymore.) It was written by Sam VanHoutte (all credits to him for
this) It is about dynamical loading of maps inside an orchestration.
Please let me know whether this helps/works... Thanks,

Kind regards,
Christof
========================================
==========
Question:
________________________________________
_____
> Is it possible to dynamically load the map to be used
> within a message Transform shape within an orchestration?
>
> We have a requirement where the schema to be mapped to
> will change based on a client identifier in the source
> message. The rest of the orchestration will be identical
> for all clients, so it would be best to be able to use
> the same orchestration for all clients.



Answer:
________________________________________
_____
This should do the job:

1)the line below in a construction-shape
transform(TargetMessage)=Namespace.MapName(GenericMessage)

2)the line below in a construction-shape
mapType=System.Type.GetType("Namespace.MapName,Assembly, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=ed7e8ddd68bfa1cf");
transform(TargetMessage)=mapType(Generic
Message);

Where
- TargetMessage is the message to be constructed
- Namespace.MapName is the Full qualified name of the map
- GenericMessage is the input message
- mapType is a variable of type System.Type


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com