The Net Tools Company - 800.225.4190
Search: 
Available in: EDI | EDI/AS2
AS1Receiver Component [IP*Works! EDI V8]

Properties   Methods   Events   Configuration Settings  

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

NOTE: What follows is a very short description of the component interfaces. For more information, please consult the help files that come with the respective package.

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.

AttachmentCountThe number of records in the Attachment arrays.
AttachmentContentTypeThe MIME content-type of this ediattachment.
AttachmentFileNameThe file name where the attachment data is stored.
AttachmentHeadersThe component fills out Headers each time any of the other properties for that ediattachment are changed.
CertEffectiveDateThe date which this certificate becomes valid.
CertEncodedThe certificate (PEM/base64 encoded).
CertExpirationDateThe date the certificate expires.
CertExtendedKeyUsageA comma-delimited list of extended key usage identifiers.
CertIssuerThe issuer of the certificate.
CertKeyPasswordThe password for the certificate's private key (if any).
CertPrivateKeyThe private key of the certificate (if available).
CertPrivateKeyAvailableShows whether a PrivateKey is available for the selected certificate.
CertPrivateKeyContainerThe name of the PrivateKey container for the certificate (if available).
CertPublicKeyThe public key of the certificate.
CertPublicKeyAlgorithmTextual description of the public key algorithm of the certificate.
CertPublicKeyLengthThe length of the certificate public key (in bits).
CertSerialNumberThe serial number of the certificate encoded as a string.
CertSignatureAlgorithmTextual description of the signature algorithm of the certificate.
CertStoreThe name of the certificate store for the client certificate.
CertStorePasswordIf the certificate store is of a type that requires a password, this property is used to specify that password in order to open the certificate store.
CertStoreTypeThe type of certificate store for this certificate.
CertSubjectThe subject of the certificate used for client authentication.
CertSubjectAltNamesA comma-separted lists of alternative subject names of the certificate.
CertThumbprintMD5MD5 hash of the certificate.
CertThumbprintSHA1SHA1 hash of the certificate.
CertUsageTextual description of UsageFlags .
CertUsageFlagsFlags that show intended use for the certificate.
CertVersionThe certificate's version number.
CompressionFormatThe compression format used on the incoming message.
ConnectedShows whether the component is connected.
EDIDataThis property contains the EDI payload of the transmission.
EDIEDITypeThe Content-Type of the EDI message.
EDIFileNameIn a sender, if FileName is specified, the file specified will be used for the EDI payload of the transmission.
EDINameName is the final name to be associated with the contents of either the Data or FileName properties.
FirewallAutoDetectThis property tells the component whether or not to automatically detect and use firewall system settings, if available.
FirewallTypeThis property determines the type of firewall to connect through.
FirewallHostThis property contains the name or IP address of firewall (optional).
FirewallPasswordThis property contains a password if authentication is to be used when connecting through the firewall.
FirewallPortThis property contains the TCP port for the firewall Host .
FirewallUserThis property contains a user name if authentication is to be used connecting through a firewall.
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.
MDNContentThis contains the entire content of the MDN Receipt.
MDNHeadersReceiptHeaders contains the AS2 headers of the MDN Receipt.
MDNMDNMDN will contain the entire machine readable text of the Message Disposition Notification in the receipt.
MDNMessageThe human-readable portion of the MDN receipt.
MDNMICValueThe Message Integrity Check(s) (one-way hash) of the original EDI message.
MDNSigningProtocolThis property contains the MIME type of the signature used, if any (i.
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.
RequestHeaderCountThe number of records in the RequestHeader arrays.
RequestHeaderFieldThis property contains the name of the HTTP header (same case as it is delivered).
RequestHeaderValueThis property contains the header contents.
RequestHeadersStringThe headers in the AS1 request.
ScanResultThe result of invoking ParseRequest.
SendToThe recipient of the original message.
SignerCertEffectiveDateThe date which this certificate becomes valid.
SignerCertEncodedThe certificate (PEM/base64 encoded).
SignerCertExpirationDateThe date the certificate expires.
SignerCertExtendedKeyUsageA comma-delimited list of extended key usage identifiers.
SignerCertIssuerThe issuer of the certificate.
SignerCertKeyPasswordThe password for the certificate's private key (if any).
SignerCertPrivateKeyThe private key of the certificate (if available).
SignerCertPrivateKeyAvailableShows whether a PrivateKey is available for the selected certificate.
SignerCertPrivateKeyContainerThe name of the PrivateKey container for the certificate (if available).
SignerCertPublicKeyThe public key of the certificate.
SignerCertPublicKeyAlgorithmTextual description of the public key algorithm of the certificate.
SignerCertPublicKeyLengthThe length of the certificate public key (in bits).
SignerCertSerialNumberThe serial number of the certificate encoded as a string.
SignerCertSignatureAlgorithmTextual description of the signature algorithm of the certificate.
SignerCertStoreThe name of the certificate store for the client certificate.
SignerCertStorePasswordIf the certificate store is of a type that requires a password, this property is used to specify that password in order to open the certificate store.
SignerCertStoreTypeThe type of certificate store for this certificate.
SignerCertSubjectThe subject of the certificate used for client authentication.
SignerCertSubjectAltNamesA comma-separted lists of alternative subject names of the certificate.
SignerCertThumbprintMD5MD5 hash of the certificate.
SignerCertThumbprintSHA1SHA1 hash of the certificate.
SignerCertUsageTextual description of UsageFlags .
SignerCertUsageFlagsFlags that show intended use for the certificate.
SignerCertVersionThe certificate's version number.
SSLAcceptServerCertEncodedThe certificate (PEM/base64 encoded).
SSLCertEncodedThe certificate (PEM/base64 encoded).
SSLCertStoreThe name of the certificate store for the client certificate.
SSLCertStorePasswordIf the certificate store is of a type that requires a password, this property is used to specify that password in order to open the certificate store.
SSLCertStoreTypeThe type of certificate store for this certificate.
SSLCertSubjectThe subject of the certificate used for client authentication.
SSLServerCertEncodedThe certificate (PEM/base64 encoded).
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.
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.
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.
SenderSigningAlgorithmThe algorithm used by the sender to sign the message.
UseCryptoAPIWhether to use the Microsoft Crypto API for cryptographic message generation.
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.
UseCryptoAPIWhether to use the Microsoft Crypto API for cryptographic message generation.
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.
| About | Privacy Policy | Terms of Use |
© Copyright 2012 /n software inc.