cancel
Showing results for 
Search instead for 
Did you mean: 

Another mapping issue...

prasad_ulagappan2
Contributor
0 Kudos

Hi all,

My source structure will be like...

<b><Information Indicator="A">

<Identifier dentifierIndicator=""

definitionOfOther=""/>

<Name/>

<AddressInformation>

<POBoxNumber/>

<BuildingHouseNumber/>

<StreetName/>......

.....

.....

</Information>

</b>

My target will be like

<b><A_Party>

<Address>

<Name>

...

...

...

</A_Party>

<B_Party>

<Address>

<Name>

...

...

...

</B_Party>

<C_Party>

<Address>

<Name>

...

...

...

</C_Party></b>

The mapping has to be done depending on the value of the <b>Indicator</b> attribute in <b>Information</b> element of the source. If the value is "A" then the mapping has to be done for <A_Party> in the target and if the value is "B" then it should be for <B_Party> and if it is C then it shoudl be for <C_Party>. (Mapping fields in all the cases are same).

How can we achive this?

Accepted Solutions (1)

Accepted Solutions (1)

former_member8655
Active Participant
0 Kudos

Hi prasad

You can use the <b>if then else</b> function provided.

In if you check if the value is 'A',then send the message to node A

and same for B and C

Regards

mitesh

Answers (2)

Answers (2)

STALANKI
Active Contributor
0 Kudos

use createif nodefunction that should suffice you..

chk this blog for more clarity /people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii

prasad_ulagappan2
Contributor
0 Kudos

Hi all,

Thank you for all the replies.

Since there is some problem in the network, I was not able to award points on time.

Points awarded.

Regards,

UP

prasad_ulagappan2
Contributor
0 Kudos

Hi all,

I would like to mention a point here. As mitesh said, I can use "if else..." But thats not a problem. Even the example that I have given is just for SDN purpose... but for actual scenario the value for the "Indicator" is more than 6 i,e it can be A/B/C/D/E/F..depending on the value, I need to do the mapping.... So I would like to have a template for all the mapping and go ahead with that. I have tried with mapping template too. Since I have imported the source from the External definition, I am not able to do the mapping template too.

So is there any other easier way to acompalish this???

Rgds,

Prasad U

Message was edited by: Prasad Ulagappan

Former Member
0 Kudos

Hi,

i think u can do it using java mapping.u can get the node and after tat u can get all the node values, run it in a loop,so for every value u can map it to the requied destination node.

i think u can get the node using <b>getelementbytagname</b> function and the value using <b>getNodeValue</b> function.

for in detail u can goto basic java mapping documents.

regards

jithesh

Message was edited by: jithesh balakrishnan