Search: 
Available in: EDI/AS2
AS3Receiver Component [IP*Works! EDI V8]

Properties   Methods   Events   Configuration Settings  

The AS3Receiver component is used to process AS3 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 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 login with.
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.
UserThe user id to login as.

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.
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.
PITrailTraces the commands sent to the server, and the respective replies.
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.

PortRangeAllows the specification of a port range where the component listens for active mode connections.
ActiveModePORTAddressAllows the specification of the PORT address value for active mode connections.
UseRemoteHostAddressForPassiveInstructs component to use the in passive mode
MaxDirEntriesInstructs component to save the amount of entries specified that are returned by the server after a ListDirectory call has been made.
UseEPSVAllows extended passive mode
CalculatePercentDoneEnables or Disables calculating the percent complete for downloads.
UseOldAUTHSSLAllows use of the 'AUTH SSL' command instead of 'AUTH TLS'.
UseProtWhenImplicitSends the PROT P command to the server.
UseClearChannelAllows for the Clear Command Channel (CCC) command
UseClearDataChannelAllows for the PROT C command
MaxLineLengthThe maximum amount of data to accumulate when no EOL is found.
FirewallListenerIf true, the component binds to a SOCKS firewall as a server (IPPort only).
CloseStreamAfterTransferIf true, the component will close the upload or download stream after the transfer.
TcpNoDelayWhether or not to delay when sending packets
AcceptAnyServerCertIf set the component will accept any certificate presented by the server
SSLProviderThe name of the security provider to use.
SSLCipherStrengthThe minimum cipher strength used for bulk encryption.
SSLEnabledProtocolsUsed to enable/disable the supported security protocols.
SSLSecurityFlagsFlags that control certificate verification
ReuseSSLSessionDetermines if the SSL session is reused.
OpenSSLCipherListA string that controls the ciphers to be used by SSL.
OpenSSLPrngSeedDataThe data to seed the pseudo random number generator(PRNG).
OpenSSLCAFileName of the file containing the list of CA's trusted by your application.
OpenSSLCADirThe path to a directory containing CA certificates.
InBufferSizeThe size in bytes of the incoming queue of the socket.
OutBufferSizeThe size in bytes of the outgoing queue of the socket.
AbsoluteTimeoutDetermines whether timeouts are inactivity timeouts or absolute timeouts.
FirewallDataUsed to send extra data to the firewall.
CodePageThe system code page used for Unicode to Multibyte translations (Windows/COM only).

| About | Privacy Policy | Terms of Use |
© Copyright 2008 /n software inc.