EDI Integrator V9 - Online Help
Available for:
EDI Integrator V9
Questions / Feedback?

AS1Receiver Component

Properties   Methods   Events   Configuration Settings   Errors  

The AS1Receiver component is used to process AS1 messages and generate receipts.

Syntax

nsoftware.InEDI.As1receiver

Remarks

The AS1Receiver component allows you to receive AS1 messages as specified in RFC 3335. The component can act as an email client, decrypt and verify incoming messages, generate receipts including Message Disposition Notifications (MDNs), and send them over SMTP/S.

Basic Operation

You should first log in to your mail server by setting MailServer, User, and Password, and invoking Connect. You may then navigate your mail inbox by setting MailMessageNumber, and inspecting properties such as MailMessageFrom, etc. When you find the desired file you may download it by invoking ReadRequest. Alternatively, you may acquire the AS1 data by other means and directly set Request and RequestHeaders.

ReadRequest (or ParseHeaders) will determine information such as From and SendTo, which will allow you to set the appropriate certificates. You may specify your certificate with the Certificate property, and your trading partner's (signing) certificate with the SignerCert property.

Then, invoke ProcessRequest to process the request and generate the MDN receipt as specified in RFC 3335. If the request was processed successfully, EDIData will contain the transmitted EDI data. If a problem occurred, EDIData will not be populated and an exception will be thrown. In either case MDNReceipt will contain the RFC-compliant receipt, which should be returned to the client.

The MDNReceipt may be returned over SMTP/S by invoking SendResponse. In case the server address for incoming mail is different than that for outgoing mail you should use Config to configure this.

To create log files, set LogDirectory prior to invoking ProcessRequest. This will log all incoming and outgoing data, and will also write the received EDI files to disk.

Example

AS1Receiver1.User = "myusername"
AS1Receiver1.Password = "mypassword"
AS1Receiver1.MailServer = "1.2.3.4"
AS1Receiver1.Connect()
// You may need to search the server for received files at this point
AS1Receiver1.MessageNumber = 1;
// You may check properties such as MailMessageFrom, etc.
AS1Receiver1.ReadRequest()
AS1Receiver1.Certificate = new Certificate(CertStoreTypes.cstPFXFile, "\\my_server_directory\\my_pfx_file.pfx", "my password", "CN=Me");
AS1Receiver1.SignerCert = (base 64 encoded certificate);
AS1Receiver1.LogDirectory = "c:\\my_server_directory\\my_log_directory";
AS1Receiver1.ProcessRequest();
AS1Receiver1.SendResponse();
AS1Receiver1.Disconnect();
Additional functionality allows the user to examine details of the client's request, to permit certain types of errors, or to customize the outgoing MDN. See the property and method list for details.

Property List


The following is the full list of the properties of the component with short descriptions. Click on the links for further details.

AttachmentsCollection of files attached to the current message.
CertificateThe decryption and receipt signing certificate.
CompressionFormatThe compression format used on the incoming message.
ConnectedShows whether the component is connected.
EDIDataThe EDI data sent in Request .
FirewallA set of properties related to firewall access.
FromThe sender of the original message.
LocalHostThe name of the local host or user-assigned IP interface through which connections are initiated or accepted.
LogDirectoryThe path to a directory for logging.
LogFileThe log file written.
MailMessageCcThe value of the Cc header of the mail message.
MailMessageCountThe number of messages waiting in the mailbox.
MailMessageDateThe message date for the currently selected message.
MailMessageFromThe sender of the mail message.
MailMessageHeadersThe message headers for the currently selected message.
MailMessageNumberThe message number on the incoming mail server.
MailMessageReplyToThe value of the ReplyTo header of the mail message.
MailMessageSizeThe size of the mail message.
MailMessageSubjectThe subject of the mail message.
MailMessageTextThe text of the mail message.
MailMessageToThe recipient of the mail message.
MailMessageUIDThe unique id of the mail message.
MailServerThe address of your mail server.
MDNReceiptThe MDN-based receipt generated by the component.
MDNToThe recipient for the Message Disposition Notification (MDN).
MessageIdThe message ID of the incoming message.
PasswordThe password for your incoming mail server.
RequestThe AS1 request to be processed.
RequestHeadersThe headers in the AS1 request.
RequestHeadersStringThe headers in the AS1 request.
ScanResultThe result of invoking ParseRequest .
SendToThe recipient of the original message.
SignerCertYour trading partner's certificate.
SSLAcceptServerCertInstructs the component to unconditionally accept the server certificate that matches the supplied certificate.
SSLCertThe certificate to be used during SSL negotiation.
SSLServerCertThe server certificate for the last established connection.
SSLStartModeDetermines how the component starts the SSL negotiation. By default, SSL will not be used.
UserThe username for your incoming mail server.

Method List


The following is the full list of the methods of the component with short descriptions. Click on the links for further details.

ConfigSets or retrieves a configuration setting .
ConnectConnects to the incoming mail server.
CreateMDNReceiptCreates MDNReceipt .
DeleteMessageDeletes the message specified by MailMessageNumber .
DisconnectDisconnects from the incoming mail server.
ParseRequestParses the EDI message and determines the EDIData .
ProcessQueueSend the messages queued for sending.
ProcessRequestProcesses the EDI data, and generates the receipt.
QueuePrepares and queues the message to the specified directory.
ReadRequestReads the AS1 request from the mail server.
ResetResets the state of the control.
SendResponseSends the MDN receipt.

Event List


The following is the full list of the events fired by the component with short descriptions. Click on the links for further details.

ConnectionStatusFired to indicate changes in connection state.
EndTransferFired when the message text completes transferring.
ErrorInformation about errors during data delivery.
HeaderFired for every message header being retrieved.
PITrailTraces the commands sent to the mail server, and the respective replies.
SignerCertInfoFired during verification of the signed message.
SSLServerAuthenticationFired after the server presents its certificate to the client.
SSLStatusShows the progress of the secure connection.
StartTransferFired when the message text starts transferring (on either a send or receive).
TransferFired while the message text gets transferred to or from MailServer .

Configuration Settings


The following is a list of configuration settings for the component with short descriptions. Click on the links for further details.

filenameThe filename of the EDI Data.
POPPortThe POP mail port to be used, if different than MailServer.
POPServerThe POP server to be used, if different than MailServer.
SMTPAuthMechanismThe authentication mechanism used to connect to the SMTP server.
SMTPPasswordThe password used for authentication.
SMTPPortThe SMTP mail port to be used, if different than MailServer.
SMTPServerThe SMTP server to be used, if different than MailServer.
SMTPSSLStartModeDetermines how SSL negotiation starts with the SMTP server.
SMTPUserThe user name used for authentication.
LogFilenameThe base name of the log file.
ReuseSSLSessionDetermines if the SSL session is reused.
SSLCipherStrengthThe minimum cipher strength used for bulk encryption.
SSLEnabledProtocolsUsed to enable/disable the supported security protocols.
SSLProviderThe name of the security provider to use.
SSLSecurityFlagsFlags that control certificate verification.
OpenSSLCADirThe path to a directory containing CA certificates.
OpenSSLCAFileName of the file containing the list of CA's trusted by your application.
OpenSSLCipherListA string that controls the ciphers to be used by SSL.
OpenSSLPrngSeedDataThe data to seed the pseudo random number generator (PRNG).
CodePageThe system code page used for Unicode to Multibyte translations.

 
 
Copyright (c) 2018 /n software inc. - All rights reserved.
Build 9.0.6635.0