alla...@gmail.com
unread,Oct 9, 2014, 7:13:30 PM10/9/14You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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!