This Adapter Module is able to replace a string of any payload with another one. Binary objects are (of course) not supported, the payload must be text-based.
- Deploy the SCA/EAR file provided by Whitepaper InterfaceDesign using NWDS/JSPM/SUM/Telnet
- Check if the deployment was successful in JNDI browser (NWA -> Troubleshooting -> Java -> JNDI Browser) It should appear under Folder WHINT with name PayloadReplaceString
- Add the Adapter Module in the Module Processor (Sender or Receiver Channel)
- Name: WHINT/PayloadReplaceString
- Type: Local
- separator = ;
- param1 = oldValue;newValue
- param2 = badString;emptyString
- param3 = clearString;blankString
- emptyString = “”
- blankString = ” “
The name of the param (except separator) is not important. You can use the parameters also in combination, the replace will be done as many times you enter a param.
Special characters have to be escaped with a backslash according to Java Regex Pattern Documentation.
A file with CRLF characters has to be corrected. In addition the string QTY is replaced by XXX.
File before (25 lines):
File after (only 1 line):