I need to populate some fields in my XML Outbound message. What is the best way to do this? I know on the inbound, you can use prepareForSave to insert data into your XML before it is processed. Can you use the prepareForSave on the outbound? Will it allow you to populate data into the XML before sending it out?
The other option I see is the outbound pipeline. Does anyone have any example of how to search for your XML tag in the existing XML and then insert the value you want? I saw some code that used the XMLTextReader to find your tag (xmlTextReader.readElementString2(‘ItemId’)) but the reader doesn’t have any ability to Write into it. How do you use the XMLTextReader and XMLTextWriter together to change your XML before it goes out? Or is there another way?