Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Splitting Lab Results (ORU) .. messageType and systemPropertiesNamespace

22 views
Skip to first unread message

alla...@gmail.com

unread,
Oct 9, 2014, 7:13:30 PM10/9/14
to
Thank you for reading this.

This is on BizTalk server 2010 for HL7 verson 2.3.

Trying to split a batch file and in the GetNext routine it will error
with "Object reference not set to an instance of an object" if we do not set the messageType and systemPropertiesNamespace.

Here's the GetNext method:

public IBaseMessage GetNext(IPipelineContext pContext)
{
if (myQ.Count > 0)
{
String messageType = "???";
IBaseMessage outMsg = pContext.GetMessageFactory().CreateMessage();
string systemPropertiesNamespace = @"???";

for (int i = 0; i < myMsg.Context.CountProperties; i++)
{
string Name, Namespace;
object PropertyValue = myMsg.Context.ReadAt(i, out Name, out Namespace);
if (myMsg.Context.IsPromoted(Name, Namespace))
{
outMsg.Context.Promote(Name, Namespace, PropertyValue);
}
}
outMsg.AddPart("Body", pContext.GetMessageFactory().CreateMessagePart(), true);
outMsg.Context.Promote("MessageType", systemPropertiesNamespace, messageType);
string temp = myQ.Dequeue().ToString();
byte[] byteArray = Encoding.ASCII.GetBytes(temp);
outMsg.BodyPart.Data = new MemoryStream(byteArray);
return outMsg;
}
else
{
return null;
}
}

Can you please help??

Thank you so much!
0 new messages