I receive a HL7 message with use of the HL7 pipeline into BizTalk. I have defined the message with multipart message types containing the header, the body and then the Z segments in the end, undeclared with the type System.String.
The message is received ok and I can see that all the tree multiparts looks correct when I debug my orchestration. The problem occurs when I try to read the Z segment in my orchestration.
I've tried to write the Z-segment multipart to both a variable and a message of type System.String, but none of this works. I don't understand why it threats the message as an XML document, when the multipart is defined with System.String! This is my error message:
I get the following error message in my eventlog:
Description:
There is an error in XML document (1, 1). System.Xml.XmlException: Data at the root level is invalid. Line 1, position 1.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlTextReader.Read()
at System.Xml.XmlReader.MoveToContent()
at System.Xml.Serialization.XmlSerializationPrimitiveReader.Read_string()
at System.Xml.Serialization.XmlSerializer.DeserializePrimitive(XmlReader xmlReader, XmlDeserializationEvents events)
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
snusmimriken