cancel
Showing results for 
Search instead for 
Did you mean: 

How to add header at the top of xml message.

Former Member
0 Kudos

Hello Friends,

I need your help to know the possible solution for the below mentioned problem.

My secnario is IDOC to JMS.

I have requirement from my client to add the header info at the top of the xml message. e.g.

XB0101000058PPS    P101     BOFTP2  XYZ568A  XYZ568  0100
 <?xml version="1.0" encoding="UTF-8"?> 
<Records>
   <RecordType>RECORDTYPE</RecordType>
   <COMPANY>COMPANY</COMPANY>
</Records>

The header should not be xml but a flat fixed length value preceding the xml.

Regards,

Sarvesh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You can try it with XSLT mapping.

Answers (2)

Answers (2)

Shabarish_Nair
Active Contributor
0 Kudos

can you try a simple Java mapping?

read the IDoc (inputstream) and the add the header and then write out to outputstream

pseudo code

String Header + String(inputsteam) = Outputstream

Former Member
0 Kudos

Can any one provide the sample code for this.

Former Member
0 Kudos

Thanks everyone!

We managed to solve it by adding the values in the Header of JMS adapter under "Additional Parameters" by using JMS String Properties.

Regards,

Sarvesh