cancel
Showing results for 
Search instead for 
Did you mean: 

Creating the new node in the target in the message mapping

Former Member
0 Kudos

Hi All,

I need to create a new node in the target in the message mapping.

The target node appearing for 8 times in the target but I need to create an additional node at the third position,means there should be total 9 nodes in the target.

Whenever I right click on the target node and click on the Duplicate Subtree option,the duplicate node is created in the 9the position instead of the 3rd position.

Is there any way to create the node in the 3rd position?

Thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

>

> Hi All,

>

> I need to create a new node in the target in the message mapping.

>

> The target node appearing for 8 times in the target but I need to create an additional node at the third position,means there should be total 9 nodes in the target.

>

> Whenever I right click on the target node and click on the Duplicate Subtree option,the duplicate node is created in the 9the position instead of the 3rd position.

>

> Is there any way to create the node in the 3rd position?

>

> Thanks in advance

No, i think there is no way for copy&paste of element node. You can do this by copy&paste in a XSD file, and reimport the file in DataType declaration.

Edited by: spantaleoni on Jan 19, 2011 11:00 AM

Answers (4)

Answers (4)

Former Member
0 Kudos

answered

stefan_grube
Active Contributor
0 Kudos

> Whenever I right click on the target node and click on the Duplicate Subtree option,the duplicate node is created in the 9the position instead of the 3rd position.

>

> Is there any way to create the node in the 3rd position?

No, this is not possible. duplicated nodes have a sequence number to allow to distinguish them,

so your nodes have already numbers 0 - 7.

When you add a new duplicated node, it gets number 8, there is now way to change this behaviour.

Former Member
0 Kudos

Hello Sweta,

the logic that I suggest you is Create a UDF with one input parameters( let us say 'a')

use the below code


for( int i =0;i<a.length;i++)
{
if(i==2)
{
result.addValue("here you can give some value ,you want the third node should have");
}
result.addValue(a<i>);
}

Note:with this UDF we are trying to create a node at level 3 passing source field values('a').

let me know if I can help you further.

Regards,

Kubra fatima

Edited by: Kubra fatima on Jan 19, 2011 11:24 AM

former_member200962
Active Contributor
0 Kudos
Is there any way to create the node in the 3rd position?

generate 1 and 2 node using the normal logic...then on third node apply the logic for additional node....then 4-9 normal logic....is there any issue using this approach?

Former Member
0 Kudos

Hi Abhishek,

Thanks for the reply.

The number of nodes in the target structure is 8 while I need to create an additional node other than the existing nodes at the 3rd position.

Means,nodes 1,2,4,5,6,7,8 are the nodes already availlabe in the structure while the additional node is supposed to be added to the 3rd postion which is not present in the target structure.

Can you please help me?

Thanks in advance

former_member200962
Active Contributor
0 Kudos
Means,nodes 1,2,4,5,6,7,8 are the nodes already availlabe 

so you mean to say 1,2,4,5,6,7,8 are different nodes (not created using Duplicate subtree) already existing in the target message?

The number of nodes in the target structure is 8 while I need to create an additional node other than the existing nodes at 
the 3rd position.

If answer to above question is yes, then you cannot create an additional node using Duplicate Subtree....you need to make use of JAVA mapping....the outout of the JAVA mapping should be a structure which has the required node at the 3rd position.

Are you sure that if you add this node in target sturcture your receiver will be able to process the message?

If possible give you actual target message with node occurences.

Edited by: abhishek salvi on Jan 19, 2011 3:35 PM

Former Member
0 Kudos

Hi Abhishek,

Thanks for the reply.

so you mean to say 1,2,4,5,6,7,8 are different nodes (not created using Duplicate subtree) already existing in the target message?

The node name iis FTX appearing 8 times in the target structure and I need it to appear 9 times that is I need to create one more FTX node but at a specified position that is the third postion.

The occurrence of the node is 0:10.

Can't I do it using duplicate subtree?

Thanks in advance

former_member200962
Active Contributor
0 Kudos
The occurrence of the node is 0:10.

Can't I do it using duplicate subtree?

yes you can surely do duplicate.

Now what you do is duplicate the target node 8 times (so in all you have 9 nodes)

now you have to specifically map the duplicated-3rd node with the additional logic.....map other duplicated nodes with the normal logic.

If you have already mapped the 8 nodes and now mapping the 9th one with additional logic then you cannot move the additional node to 3rd position.