Skip to Content
avatar image
Former Member

java mapping : to remove "&" from payload.

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Dec 29, 2010 at 12:26 PM

    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]

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 29, 2010 at 12:43 PM

    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,

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 29, 2010 at 01:13 PM

    > 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.

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 29, 2010 at 03:41 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 06, 2011 at 11:32 AM

    Hi shreyasengupta,

    Please check this link.

    special-character-handling-in-the-payload-content

    Regards,

    KRaghuVamsee

    Add comment
    10|10000 characters needed characters exceeded