04-26-04 12:35 PM
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
[ Post a follow-up to this message ]
|