Yea, I wish this was a non-multipart message, but with HL7 it will need to be.
I have been following the instructions given from microsoft and it appears the z-segment needs to be System.String. I tried using system.xml.xmldocument and the segment never made it to the outgoing message.
The only other idea that I had was to wrap my string in xml and hope that the disassembler recognized it, but it appears that is just replaces any < and > tags with the xml compliant tags, < and >.
I am not sure where to go from here….