EBData Type

The EDI payload of the AS4 message.

Remarks

The EDI payload of the AS4 message.

Fields

Data
String

This field contains the EDI payload of the transmission.

When sending files this may be specified to the data to be sent. This can be used as an alternative to setting Filename.

When receiving files this will only be populated if IncomingDirectory and OutputStream have not been specified and ParseRequest finishes without an error. If so, Data will contain the full decrypted text of the EDI message.

DataB
Byte[]

This field contains the EDI payload of the transmission.

When sending files this may be specified to the data to be sent. This can be used as an alternative to setting Filename.

When receiving files this will only be populated if IncomingDirectory and OutputStream have not been specified and ParseRequest finishes without an error. If so, Data will contain the full decrypted text of the EDI message.

EDIType
String

The Content-Type of the EDI message. Sample values are "application/edi-x12", "application/edifact" or "application/xml".

Filename
String

When sending, if Filename is specified, the file specified will be used for the EDI payload of the transmission. Name will be populated with the name of the file.

When receiving, if IncomingDirectory is set, this will be populated with the name of the file which contains the processed message contents.

Note: When OutputStream is set, the data will be written to the stream and this field will not be populated.

InputStream
System.IO.Stream

When sending, if InputStream is specified, the data from the specified stream will be used for the EDI payload of the transmission.

Name
String

Name is the final name to be associated with the contents of either the Data or FileName fields. This corresponds to the filename attribute of the Content-Disposition header for the EDI payload.

When constructing EDI data to be sent, Name will be set to the same value as FileName, but can be overridden after setting FileName to indicate that another name should be used in the outbound request's Content-Disposition MIME header.

When receiving EDI data, Name will be read out of the "filename" attribute of the inbound request's Content-Disposition MIME header.

OutputStream
System.IO.Stream

When using AS4Server to receive files, if this field is set, the EDI payload will be written to this stream if ParseRequest finishes without an error. If so, the specified stream will contain the full decrypted text of the EDI message.

This setting is not applicable to AS4Client.

PropertyCount
Integer

The number of properties for this file.

Each file may contain zero or more properties associated with it. This property, in conjunction with PropertyIndex, PropertyName, and PropertyValue can be used to specify properties when sending and read properties when receiving.

Sending

When sending files to add properties set PropertyCount to specify the number of properties. Then set PropertyIndex to select the property. Set PropertyName and PropertyValue to define the values for the property at PropertyIndex. For instance:

data = new EBData();
data.EDIType = "image/jpeg";
data.Filename = "..\\1.jpg";
data.Name = "1.jpg";
data.PropertyCount = 2; //Define two properties
data.PropertyIndex = 0; //Select the first property
data.PropertyName = "name1";
data.PropertyValue = "value1";
data.PropertyIndex = 1; //Select the second property
data.PropertyName = "name2";
data.PropertyValue = "value2";

Receiving

When receiving files these properties may be queried to retrieve the values set by the sender. Inspect PropertyCount to obtain the number of properties. Next set PropertyIndex to select a property and query PropertyName and PropertyValue. For instance:


for (int i = 0; i < server.EDIData[0].PropertyCount;i++)
{
  server.EDIData[0].PropertyIndex = i;
  Console.WriteLine(server.EDIData[0].PropertyName + ": " + server.EDIData[0].PropertyValue);
}

PropertyIndex
Integer

Selects a property at the specified index.

PropertyName
String

The name of the property.

PropertyValue
String

The value of the property.

SchemaLocation
String

The SchemaLocation, SchemaNamespace, and SchemaVersion optionally define the schema that applies to this particular file. This may be used by the receiving party to properly interpret the file data.

Schema information is not required, but if schema information is included SchemaLocation is required and must be set to the URI of the schema.

This value corresponds to the ebMS element "eb:Messaging/eb:UserMessage/eb:PayloadInfo/eb:PartInfo/eb:Schema@location"

SchemaNamespace
String

The namespace of the schema. This field is optional. Refer to SchemaLocation for details.

This value corresponds to the ebMS element "eb:Messaging/eb:UserMessage/eb:PayloadInfo/eb:PartInfo/eb:Schema@namespace"

SchemaVersion
String

The version of the schema. This field is optional. Refer to SchemaLocation for details.

This value corresponds to the ebMS element "eb:Messaging/eb:UserMessage/eb:PayloadInfo/eb:PartInfo/eb:Schema@namespace"

Constructors

public EBData();
Public EBData()
public EBData(byte[] data, string EDIType);
Public EBData(ByVal Data As Byte(), ByVal EDIType As String)
public EBData(string filename, string EDIType);
Public EBData(ByVal Filename As String, ByVal EDIType As String)

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