cancel
Showing results for 
Search instead for 
Did you mean: 

dealing with new line characters using Plain2XML module

Former Member
0 Kudos

Hi,

We have a JMS communication channel to process messages arriving from MQ. The message payload is in datagram form and we are using the Plain2XML module, in the MessageTransformBean, to parse and convert to xml.

We've had a few failures due to new-line characters being included in the payload from the MQ message. The NL characters have resulted in the message being parsed incorrectly. We would therefore like to add a check to deal with new-line and carriage-return characters (and potentially replace them with a space).

Does anybody have any idea how to do this?

Also, I have tried to look through the SAP documentation for the usage of the various available parameters. Although I can find example configurations, I can't find a document that lists al the available parameters and an explanation of what they do. I would appreciate it if somebody could point me to documenation for these parameters.

Thanks,

Georgia

Accepted Solutions (1)

Accepted Solutions (1)

MichalKrawczyk
Active Contributor
0 Kudos

hi,

>>>We would therefore like to add a check to deal with new-line and carriage-return characters (and potentially replace them with a space).

you can always write a small adapter module which will just replace them and put it before Plain2XML bean

Regards,

Michal Krawczyk

Former Member
0 Kudos

Hi,

Thanks for the reply..

If this option does not exist in the supplied modules, I will write a separate module as you suggested. I've only been working with PI for a short amount of time and still not very familiar with what comes as standard and what needs an addition/customisation.

However, it would also be good to know if there is some documentation that comes with the modules provided by SAP and how to use the associated parameters properties.. i.e. is there any javadoc or sap help page? I may be missing something but specifically for the plain2xml module I can only find examples. Any ideas?

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

SAP does not give a lot of info about those but SDN does

part one:

https://weblogs.sdn.sap.com/pub/wlg/16968

and two:

https://weblogs.sdn.sap.com/pub/wlg/16968

the rest you need to check youself

Regards,

Michal Krawczyk

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Georgia,

I don't know if it's applicable to JMS adapter, or if it will solve your issue (sorry) but SAP give this example to manage CRLF and LF. [http://help.sap.com/saphelp_nwpi711/helpdata/en/96/f04142099eb76be10000000a155106/content.htm]

Mickael

Former Member
0 Kudos

I haven't had a chance to play with this module yet, but it definetely looks very promising. Hopefully, I can get it doing what I need it with a few tweaks.

Thank you for your help!

Former Member
0 Kudos

Hi

I have a similar scenario. Can you please share the code or configuration if you fixed through custom module or through Standard Module in Adapter processing or let me know if you followed a different approach. Appreciate your help.