IPWorks EDI 2020 Kotlin Edition

Questions / Feedback?

AS3Receiver Component

Properties   Methods   Events   Configuration Settings   Errors  

The AS3Receiver component is used to process AS3 messages and generate receipts.

Syntax

ipworksedi.As3receiver

Remarks

The AS3Receiver component allows you to receive AS3 messages over FTP, as specified in [AS3] and RFC 3335. The component can act as a FTP client, decrypt and verify incoming messages, and generate receipts including Message Disposition Notifications (MDNs). The component is designed to interoperate easily with a standard FTP server.

BASIC OPERATION

You should first log in to the FTP server by invoking Logon. If you need to search the FTP server for requests you may set RemotePath, invoke ListDirectory, etc. When you find the desired files you may then download them invoking ReadRequest. Alternatively, if you acquire the AS3 data by other means you may simply set Request.

ReadRequest (or ParseHeaders) will determine information such as AS3From and AS3To, 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 [AS3]. 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 the same FTP connection by invoking SendResponse. If it is necessary to create a new connection or send receipts to a different server you may Logoff and Logon at will.

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

AS3Receiver1.User = "myusername"
AS3Receiver1.Password = "mypassword"
AS3Receiver1.RemoteHost = "ftp.mytradingpartner.com"
AS3Receiver1.Logon()
// You may need to search the server for received files at this point
AS3Receiver1.ReadRequest("1053-ji094986.as3")
// At this point, you should check the values of AS2From and AS2To.
AS3Receiver1.Certificate = new Certificate(CertStoreTypes.cstPFXFile, "\\my_server_directory\\my_pfx_file.pfx", "my password", "CN=Me");
AS3Receiver1.SignerCert = (...);
AS3Receiver1.LogDirectory = "c:\\my_server_directory\\my_log_directory";
AS3Receiver1.ProcessRequest();
// It will probably be necessary to change the RemotePath or even logon
// to a different server here. 
AS3Receiver1.SendResponse("1053-ji094986-mdn.as3");
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.

AS3FromThe identity of the sending system.
AS3ToThe identity of the receiving system.
AS3VersionIncomingThe version of AS3 being used.
AS3VersionOutgoingThe version of AS3 being used.
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.
FTPCommandAn FTP command to be sent directly to the FTP server.
FTPLastReplyThe last reply from the FTP server.
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.
MDNReceiptThe MDN-based receipt generated by the component.
MDNToThe URL for the Message Disposition Notification (MDN).
MessageIdThe message ID of the incoming message.
PassiveControls whether to direct the server into passive mode. Recommended if behind a firewall.
PasswordThe password to log in.
RemoteHostThe domain name or IP address of the FTP server.
RemotePathThe current path in the FTP server.
RemotePortThe port for the FTP service (default is 21).
RequestThe AS3 request to process.
RequestHeadersThe headers in the AS3 request.
RequestHeadersStringThe headers in the AS3 request.
ScanResultThe result of invoking ParseRequest .
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.
TimeoutA timeout for the component.
UserThe user identifier to use for login.

Method List


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

AbortAbort Current Upload/Download.
ConfigSets or retrieves a configuration setting.
CreateMDNReceiptCreates MDNReceipt .
DeleteFileRemove a file specified by FileName from an FTP server.
GetFileSizeGets the size of a file on the FTP server.
GetFileTimeGets the last modification time of a file on the FTP server.
ListDirectoryList the current directory on an FTP server.
ListDirectoryLongList the current directory on an FTP server.
LogoffLogoff from the FTP server by posting a QUIT command.
LogonLogon to the FTP RemoteHost using the current User and Password .
ParseRequestParses the EDI message and determines the EDIData .
ProcessRequestProcesses the EDI data, and generates the receipt.
ReadRequestReads the AS3 request from the FTP server.
ResetResets the state of the control.
SendResponseUploads 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.
DirListFired when a directory entry is received.
EndTransferFired when a file completes downloading/uploading.
ErrorInformation about errors during data delivery.
LogFired with log information while processing a message.
PITrailTraces the commands sent to the 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 a file starts downloading/uploading.
TransferFired during file download/upload.

Configuration Settings


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

LogFilenameThe base name of the log file.
ActiveModeIPAllows the specification of the IP address that the server will connect to for active mode connections.
ActiveModePORTAddressAllows the specification of the PORT address value for active mode connections.
AppendToLocalFileAppend downloaded files to a local file.
ApplyFileMaskLocallyWhether to filter the directory listing locally or on the server.
AutoSelectDataIPAutomatically select the data connection IP.
CalculatePercentDoneEnables or Disables calculating the percent complete for downloads.
CheckTotalEntryWhether to ignore directory listing total lines.
DILingerWhen set to True, DI connections are terminated gracefully.
DILingerTimeTime in seconds to have the DI connection linger.
DirEntryPatternAllows the use of regular expressions to parse non-standard directory entry formats.
FileTimeFormatThe format of file time reported by the server.
IgnoreEntriesDirectory entry data to ignore.
MaskSensitiveMasks passwords in logs.
MaxDirEntriesInstructs component to save the amount of entries specified that are returned by the server after a ListDirectory call has been made.
ModeZCompressionLevelUsed to specify the level of compression used.
PortRangeAllows the specification of a port range where the component listens for active mode connections.
PreserveFileTimeAttempts to preserve timestamps when transferring files.
RealTimeUploadEnables real time uploading.
RealTimeUploadAgeLimitThe age limit in seconds when using RealTimeUpload.
ReusePISSLSessionInDIWhether the PI SSL session will be reused for the DI connection.
ReuseSSLSessionInDIWhether the SSL session will be reused for the DI connection.
UseClearChannelAllows for the Clear Command Channel (CCC) command.
UseClearDataChannelAllows for the PROT C command.
UseEPSVAllows extended passive mode.
UseMLSDUses listings for machine processing.
UseMLSTUses single file listing for machine processing.
UseModeZAllows compression to be used when transferring data.
UseOldAUTHSSLAllows use of the 'AUTH SSL' command instead of 'AUTH TLS'.
UseProtWhenImplicitSends the PROT P command to the server.
UseRemoteHostAddressForPassiveInstructs the component to use the address specified by RemoteHost when establishing a data connection.
VirtualHostNameSends the HOST command to the server.
CloseStreamAfterTransferIf true, the component will close the upload or download stream after the transfer.
ConnectionTimeoutSets a separate timeout value for establishing a connection.
FirewallAutoDetectTells the component whether or not to automatically detect and use firewall system settings, if available.
FirewallHostName or IP address of firewall (optional).
FirewallListenerIf true, the component binds to a SOCKS firewall as a server (IPPort only).
FirewallPasswordPassword to be used if authentication is to be used when connecting through the firewall.
FirewallPortThe TCP port for the FirewallHost;.
FirewallTypeDetermines the type of firewall to connect through.
FirewallUserA user name if authentication is to be used connecting through a firewall.
KeepAliveIntervalThe retry interval, in milliseconds, to be used when a TCP keep-alive packet is sent and no response is received.
KeepAliveTimeThe inactivity time in milliseconds before a TCP keep-alive packet is sent.
LingerWhen set to True, connections are terminated gracefully.
LingerTimeTime in seconds to have the connection linger.
LocalHostThe name of the local host through which connections are initiated or accepted.
LocalPortThe port in the local host where the component binds.
MaxLineLengthThe maximum amount of data to accumulate when no EOL is found.
MaxTransferRateThe transfer rate limit in bytes per second.
ProxyExceptionsListA semicolon separated list of hosts and IPs to bypass when using a proxy.
TCPKeepAliveDetermines whether or not the keep alive socket option is enabled.
TcpNoDelayWhether or not to delay when sending packets.
UseIPv6Whether to use IPv6.
UseNTLMv2Whether to use NTLM V2.
LogSSLPacketsControls whether SSL packets are logged when using the internal security API.
ReuseSSLSessionDetermines if the SSL session is reused.
SSLCACertsA newline separated list of CA certificate to use during SSL client authentication.
SSLCheckCRLWhether to check the Certificate Revocation List for the server certificate.
SSLCipherStrengthThe minimum cipher strength used for bulk encryption.
SSLContextProtocolThe protocol used when getting an SSLContext instance.
SSLEnabledCipherSuitesThe cipher suite to be used in an SSL negotiation.
SSLEnabledProtocolsUsed to enable/disable the supported security protocols.
SSLEnableRenegotiationWhether the renegotiation_info SSL extension is supported.
SSLIncludeCertChainWhether the entire certificate chain is included in the SSLServerAuthentication event.
SSLNegotiatedCipherReturns the negotiated ciphersuite.
SSLNegotiatedCipherStrengthReturns the negotiated ciphersuite strength.
SSLNegotiatedCipherSuiteReturns the negotiated ciphersuite.
SSLNegotiatedKeyExchangeReturns the negotiated key exchange algorithm.
SSLNegotiatedKeyExchangeStrengthReturns the negotiated key exchange algorithm strength.
SSLNegotiatedProtocolReturns the negotiated protocol version.
SSLProviderThe name of the security provider to use.
SSLServerCACertsA newline separated list of CA certificate to use during SSL server certificate validation.
SSLTrustManagerFactoryAlgorithmThe algorithm to be used to create a TrustManager through TrustManagerFactory.
TLS12SignatureAlgorithmsDefines the allowed TLS 1.2 signature algorithms when UseInternalSecurityAPI is True.
TLS12SupportedGroupsThe supported groups for ECC.
TLS13KeyShareGroupsThe groups for which to pregenerate key shares.
TLS13SignatureAlgorithmsThe allowed certificate signature algorithms.
TLS13SupportedGroupsThe supported groups for (EC)DHE key exchange.
AbsoluteTimeoutDetermines whether timeouts are inactivity timeouts or absolute timeouts.
FirewallDataUsed to send extra data to the firewall.
InBufferSizeThe size in bytes of the incoming queue of the socket.
OutBufferSizeThe size in bytes of the outgoing queue of the socket.
BuildInfoInformation about the product's build.
GUIAvailableTells the component whether or not a message loop is available for processing events.
LicenseInfoInformation about the current license.
UseDaemonThreadsWhether threads created by the component are daemon threads.
UseInternalSecurityAPITells the component whether or not to use the system security libraries or an internal implementation.

Copyright (c) 2021 /n software inc. - All rights reserved.
IPWorks EDI 2020 Kotlin Edition - Version 20.0 [Build 8033]