AS3Receiver Component
Properties Methods Events Configuration Settings Errors
The AS3Receiver component is used to process AS3 messages and generate receipts.
Syntax
nsoftware.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.
AS3From | The identity of the sending system. |
AS3To | The identity of the receiving system. |
AS3VersionIncoming | The version of AS3 being used. |
AS3VersionOutgoing | The version of AS3 being used. |
Attachments | Collection of files attached to the current message. |
Certificate | The decryption and receipt signing certificate. |
CompressionFormat | The compression format used on the incoming message. |
Connected | Shows whether the component is connected. |
EDIData | The EDI data sent in Request . |
Firewall | A set of properties related to firewall access. |
FTPCommand | An FTP command to be sent directly to the FTP server. |
FTPLastReply | The last reply from the FTP server. |
LocalHost | The name of the local host or user-assigned IP interface through which connections are initiated or accepted. |
LogDirectory | The path to a directory for logging. |
LogFile | The log file written. |
MDNReceipt | The MDN-based receipt generated by the component. |
MDNTo | The URL for the Message Disposition Notification (MDN). |
MessageId | The message ID of the incoming message. |
Passive | Controls whether to direct the server into passive mode. Recommended if behind a firewall. |
Password | The password to log in. |
RemoteHost | The domain name or IP address of the FTP server. |
RemotePath | The current path in the FTP server. |
RemotePort | The port for the FTP service (default is 21). |
Request | The AS3 request to process. |
RequestHeaders | The headers in the AS3 request. |
RequestHeadersString | The headers in the AS3 request. |
ScanResult | The result of invoking ParseRequest . |
SignerCert | Your trading partner's certificate. |
SSLAcceptServerCert | Instructs the component to unconditionally accept the server certificate that matches the supplied certificate. |
SSLCert | The certificate to be used during SSL negotiation. |
SSLServerCert | The server certificate for the last established connection. |
SSLStartMode | Determines how the component starts the SSL negotiation. By default, SSL will not be used. |
Timeout | A timeout for the component. |
User | The 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.
Abort | Abort Current Upload/Download. |
Config | Sets or retrieves a configuration setting. |
CreateMDNReceipt | Creates MDNReceipt . |
DeleteFile | Remove a file specified by FileName from an FTP server. |
GetFileSize | Gets the size of a file on the FTP server. |
GetFileTime | Gets the last modification time of a file on the FTP server. |
ListDirectory | List the current directory on an FTP server. |
ListDirectoryLong | List the current directory on an FTP server. |
Logoff | Logoff from the FTP server by posting a QUIT command. |
Logon | Logon to the FTP RemoteHost using the current User and Password . |
ParseRequest | Parses the EDI message and determines the EDIData . |
ProcessRequest | Processes the EDI data, and generates the receipt. |
ReadRequest | Reads the AS3 request from the FTP server. |
Reset | Resets the state of the control. |
SendResponse | Uploads 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.
ConnectionStatus | Fired to indicate changes in connection state. |
DirList | Fired when a directory entry is received. |
EndTransfer | Fired when a file completes downloading/uploading. |
Error | Information about errors during data delivery. |
Log | Fired with log information while processing a message. |
PITrail | Traces the commands sent to the server, and the respective replies. |
SignerCertInfo | Fired during verification of the signed message. |
SSLServerAuthentication | Fired after the server presents its certificate to the client. |
SSLStatus | Shows the progress of the secure connection. |
StartTransfer | Fired when a file starts downloading/uploading. |
Transfer | Fired 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.
LogFilename | The base name of the log file. |
ActiveModeIP | Allows the specification of the IP address that the server will connect to for active mode connections. |
ActiveModePORTAddress | Allows the specification of the PORT address value for active mode connections. |
AppendToLocalFile | Append downloaded files to a local file. |
ApplyFileMaskLocally | Whether to filter the directory listing locally or on the server. |
AutoSelectDataIP | Automatically select the data connection IP. |
CalculatePercentDone | Enables or Disables calculating the percent complete for downloads. |
CheckTotalEntry | Whether to ignore directory listing total lines. |
DILinger | When set to True, DI connections are terminated gracefully. |
DILingerTime | Time in seconds to have the DI connection linger. |
DirEntryPattern | Allows the use of regular expressions to parse non-standard directory entry formats. |
FileTimeFormat | The format of file time reported by the server. |
IgnoreEntries | Directory entry data to ignore. |
MaskSensitive | Masks passwords in logs. |
MaxDirEntries | Instructs component to save the amount of entries specified that are returned by the server after a ListDirectory call has been made. |
ModeZCompressionLevel | Used to specify the level of compression used. |
PortRange | Allows the specification of a port range where the component listens for active mode connections. |
PreserveFileTime | Attempts to preserve timestamps when transferring files. |
RealTimeUpload | Enables real time uploading. |
RealTimeUploadAgeLimit | The age limit in seconds when using RealTimeUpload. |
ReusePISSLSessionInDI | Whether the PI SSL session will be reused for the DI connection. |
ReuseSSLSessionInDI | Whether the SSL session will be reused for the DI connection. |
UseClearChannel | Allows for the Clear Command Channel (CCC) command. |
UseClearDataChannel | Allows for the PROT C command. |
UseEPSV | Allows extended passive mode. |
UseMLSD | Uses listings for machine processing. |
UseMLST | Uses single file listing for machine processing. |
UseModeZ | Allows compression to be used when transferring data. |
UseOldAUTHSSL | Allows use of the 'AUTH SSL' command instead of 'AUTH TLS'. |
UseProtWhenImplicit | Sends the PROT P command to the server. |
UseRemoteHostAddressForPassive | Instructs the component to use the address specified by RemoteHost when establishing a data connection. |
VirtualHostName | Sends the HOST command to the server. |
CloseStreamAfterTransfer | If true, the component will close the upload or download stream after the transfer. |
ConnectionTimeout | Sets a separate timeout value for establishing a connection. |
FirewallAutoDetect | Tells the component whether or not to automatically detect and use firewall system settings, if available. |
FirewallHost | Name or IP address of firewall (optional). |
FirewallListener | If true, the component binds to a SOCKS firewall as a server (IPPort only). |
FirewallPassword | Password to be used if authentication is to be used when connecting through the firewall. |
FirewallPort | The TCP port for the FirewallHost;. |
FirewallType | Determines the type of firewall to connect through. |
FirewallUser | A user name if authentication is to be used connecting through a firewall. |
KeepAliveInterval | The retry interval, in milliseconds, to be used when a TCP keep-alive packet is sent and no response is received. |
KeepAliveTime | The inactivity time in milliseconds before a TCP keep-alive packet is sent. |
Linger | When set to True, connections are terminated gracefully. |
LingerTime | Time in seconds to have the connection linger. |
LocalHost | The name of the local host through which connections are initiated or accepted. |
LocalPort | The port in the local host where the component binds. |
MaxLineLength | The maximum amount of data to accumulate when no EOL is found. |
MaxTransferRate | The transfer rate limit in bytes per second. |
ProxyExceptionsList | A semicolon separated list of hosts and IPs to bypass when using a proxy. |
TCPKeepAlive | Determines whether or not the keep alive socket option is enabled. |
TcpNoDelay | Whether or not to delay when sending packets. |
UseIPv6 | Whether to use IPv6. |
UseNTLMv2 | Whether to use NTLM V2. |
CACertFilePaths | The paths to CA certificate files when using Mono on Unix/Linux. |
LogSSLPackets | Controls whether SSL packets are logged when using the internal security API. |
ReuseSSLSession | Determines if the SSL session is reused. |
SSLCACerts | A newline separated list of CA certificate to use during SSL client authentication. |
SSLCheckCRL | Whether to check the Certificate Revocation List for the server certificate. |
SSLCipherStrength | The minimum cipher strength used for bulk encryption. |
SSLEnabledCipherSuites | The cipher suite to be used in an SSL negotiation. |
SSLEnabledProtocols | Used to enable/disable the supported security protocols. |
SSLEnableRenegotiation | Whether the renegotiation_info SSL extension is supported. |
SSLIncludeCertChain | Whether the entire certificate chain is included in the SSLServerAuthentication event. |
SSLNegotiatedCipher | Returns the negotiated ciphersuite. |
SSLNegotiatedCipherStrength | Returns the negotiated ciphersuite strength. |
SSLNegotiatedCipherSuite | Returns the negotiated ciphersuite. |
SSLNegotiatedKeyExchange | Returns the negotiated key exchange algorithm. |
SSLNegotiatedKeyExchangeStrength | Returns the negotiated key exchange algorithm strength. |
SSLNegotiatedVersion | Returns the negotiated protocol version. |
SSLProvider | The name of the security provider to use. |
SSLSecurityFlags | Flags that control certificate verification. |
SSLServerCACerts | A newline separated list of CA certificate to use during SSL server certificate validation. |
TLS12SignatureAlgorithms | Defines the allowed TLS 1.2 signature algorithms when UseInternalSecurityAPI is True. |
TLS12SupportedGroups | The supported groups for ECC. |
TLS13KeyShareGroups | The groups for which to pregenerate key shares. |
TLS13SignatureAlgorithms | The allowed certificate signature algorithms. |
TLS13SupportedGroups | The supported groups for (EC)DHE key exchange. |
AbsoluteTimeout | Determines whether timeouts are inactivity timeouts or absolute timeouts. |
FirewallData | Used to send extra data to the firewall. |
InBufferSize | The size in bytes of the incoming queue of the socket. |
OutBufferSize | The size in bytes of the outgoing queue of the socket. |
BuildInfo | Information about the product's build. |
GUIAvailable | Tells the component whether or not a message loop is available for processing events. |
LicenseInfo | Information about the current license. |
UseInternalSecurityAPI | Tells the component whether or not to use the system security libraries or an internal implementation. |