cancel
Showing results for 
Search instead for 
Did you mean: 

java mapping : to remove "&" from payload.

Former Member
0 Kudos

hi experts,

Am new to XI. i need help.

i have a payload wich has several "&"s in it. i need to write a piece of java code in NWDS that can remove this "&".

this code will be uploaded as java mapping. next i will subject this payload to graphical mapping to meet the desired logical requirement. once the requirement is fulfilled again i need to restore the "&"s at their original palce. there can be several "&"s present in the payload.

java mapping----


will remove "&"s

graphical mapping-----will do the necessary logical transformations

java mapping----


will restore the "&"s in their original positions.

kindly help.

please revert back if you need any additional information.

Accepted Solutions (0)

Answers (5)

Answers (5)

RaghuVamseedhar
Active Contributor
0 Kudos

Hi shreyasengupta,

Please check this link.

Regards,

KRaghuVamsee

baskar_gopalakrishnan2
Active Contributor
0 Kudos

I see you want consecutive mappings here

1)Java Mapping (Remove special chars)

2) MM

3) Java Mapping (Restore special chars) Dont know why?

For the first step you can use the given link by shabarish and in third step again you have to write logic to insert those special characters in your data elements. This is not an elegant approach. You are going to run into high maintanence.

Suggestion: Try to filter the special characters from the sender side itself. If you dont get any option then go for the above ways.

stefan_grube
Active Contributor
0 Kudos

> i have a payload wich has several "&"s in it. i need to write a piece of java code in NWDS that can remove this "&".

If you have an issue with &, then fix it on sender side, not in XI.

Former Member
0 Kudos

Check this blog, this helps in Handling the Special Characters in XI

http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/9420 [original link is broken] [original link is broken] [original link is broken]

Thanks,

Shabarish_Nair
Active Contributor
0 Kudos

ref

http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/9420%3Fpage%3Dlast%26x-showcontent%3Doff [original link is broken] [original link is broken] [original link is broken]