MessageProperties Property

A collection of message properties.

Syntax

public EBPropertyList MessageProperties { get; }
Public Property MessageProperties As EBPropertyList

Remarks

This collection specifies the message level properties that are sent with the message. This may be used to add additional values. The semantics of the values are beyond the scope of AS4, but this may be used for values that assist with processing, or other user-defined use cases.

These properties may be populated before sending a message, and are populated after parsing an incoming message.

Sending

When sending a message any number of properties may be added. The PropertyType field is optional. For instance:

//using fields
client.MessageProperties.Add(new EBProperty());
client.MessageProperties[0].Name = "name1";
client.MessageProperties[0].Value = "value1";
client.MessageProperties[0].PropertyType = "string"; //optional

//using constructor
client.MessageProperties.Add(new EBProperty("name2", "value2"));

Receiving

When receiving a message the properties may be read from this collection. For instance:

for (int i = 0; i < server.MessageProperties.Count; i++)
{
  Console.WriteLine(server.MessageProperties[i].Name + ": " + server.MessageProperties[i].Value);
}

This value corresponds to the ebMS element "eb:Messaging/eb:UserMessage/eb:MessageProperties""

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks EDI 2020 .NET Edition - Version 20.0 [Build 8203]