cancel
Showing results for 
Search instead for 
Did you mean: 

Message Mapping - NewLine generation in the target field

Former Member
0 Kudos

Hi ,

This is a File to SOAP scenario, where text file is picked by XI and posted to target using webservice in the xml format.In the message mapping, I am supposed perform a logic where 3 fields in the source structured are to be concatenated and sent to the target structure. This fields at the target structure are to be displayed with a newline character.

So if I am sending : abc, 123 and xyz as input and the output should be in one field as follows :

<ns3:OutputField xmlns:ns3=abc

123

xyz</ns3:StreetAddressLine>

I have used this "&#x0D;&#x0A;" as the seperator in the concat function, hoping this would produce a new line but was hopeless.

Any ideas are appreicated.

Thanks,

Rag

Accepted Solutions (0)

Answers (4)

Answers (4)

dharamveer_gaur2
Active Contributor
0 Kudos

Hi,

Target side when you see XML format then only you can see Newline not in Graphical way. Click on SRC icon

Use UDF like (here src1 and src2 are input argument and result is parameter of type string)

String temp1="";

temp1 = src1+ "\n";

result = temp1.concat(src2);

return result;

henrique_pinto
Active Contributor
0 Kudos

Did you try to achieve that with Java or XSLT mapping?

It may be a restriction of message mapping.

BR,

Henrique.

Former Member
0 Kudos

Hi Raghav,

XML will never show new line or space characters.

Try to open the message in notepad or wordpad and then check if you can see the new line character.

-Supriya.

Former Member
0 Kudos

Hi,

As an alternative I have used an UDF between the fields like this :

TargetString= (((Field1 + '\n') + Field2 + '\n') + Field3);

But the XML generated had a single concatenated string with no line feeds (new Lines).

Appreciate your inputs..

Thanks,

Rag

Former Member
0 Kudos

If you are looking your results in MONI then try to look the source code rather looking the actual XML. Just right click on output screen and select "view source" option there you will be able to see your actual resuts..