on 04-04-2007 5:01 AM
Dear All
I would like to know if XI message mapping(graphical mapping) can be
used for mapping based on the order of elements given in the XML source
message.
For example I have a source message as below
Source XML:
<Source>
<givenname>Ramesh</givenname>
<givenname>Kumar</givenname>
<givenname>Ganapathy</givenname>
</Source>
semantic is first instance of <givenname> needs to be mapped <firstname> in target,
Second occurance of <givenname> needs to be mapped <secondname>,
Third occurance of <givenname> needs to be mapped <familyname>
Target XML
<Target>
<firstname>Ramesh</firstname>
<secondname>Kumar</secondname>
<familyname>Ganapathy</familyname>
</Target>
As I understand graphical mapping editor works based on Xpath
expressions, Is it possible to achieve such mapping schematics with
graphical mapping and UDF in XI.
Please note I cannot use Java, ABAP or XSLT mapping programme.
Can you provide me some hints on how to do this.
Thanks
Satish
Hi Satish,
This functionality can be achived using simple CopyValue function.
- Map <i>givenname</i> to CopyValue with the function property set to 0. This should be mapped to <i>firstname</i>
- Map <i>givenname</i> to CopyValue with the function property set to 1. This should be mapped to <i>secondname</i>
- Map <i>givenname</i> to CopyValue with the function property set to 2. This should be mapped to <i>familyname</i>
Regards,
Keerti Nayak
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Satish,
This functionality can be achived using simple CopyValue function.
- Map <i>givenname</i> to CopyValue with the function property set to 0. This should be mapped to <i>firstname</i>
- Map <i>givenname</i> to CopyValue with the function property set to 1. This should be mapped to <i>secondname</i>
- Map <i>givenname</i> to CopyValue with the function property set to 2. This should be mapped to <i>familyname</i>
Regards,
Keerti Nayak
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can write User defined function for this.With the help of for lop one can achieve this.
Regards
Madhu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can achieve this by UDF in message mapping.
see for example:
Type of UDF is queue. use three diff UDfs
input givenname -- UDF --- firstname
result.addValue(givenname(1));
input givenname -- UDF --- secondname
result.addValue(givenname(2));
input givenname -- UDF --- thirdname
result.addValue(givenname(3));
Regards
Chilla
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Chilla
This is how I am currently handling it. But my problem is
The number of UDF's keeps increasing if I have a fourth, fifth element to handle. I have to create new UDF for every new level added.
Is there a way I can do this with single UDF.
result.addValue(givenname(X));
X- will be the position and I can pass values as an argument to the UDF.
Again the problem here is when I have second argument to specify which value of input to pick up say for example givenname(1) or givenname(2)
The second argument expects an String[] array as argument and not string(when i assign a constant its a string).
So I cannot attach a constant to the second argument and pass the input.
Is there any functions that can return a String[] array as an output taking sting value as input.
Thanks
Satish
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.