IPWorks EDI 2020 macOS Edition

Questions / Feedback?

RNIFReceiver Module

Properties   Methods   Events   Configuration Settings   Errors  

The RNIFReceiver component implements a RosettaNet server.

Syntax

nsoftware.IPWorksEDI.Rnifreceiver

Remarks

The RNIFReceiver implements server-side receiving of RosettaNet messages, as specified by the RosettaNet community. It can be used to decrypt and verify incoming messages and to generate synchronous receipts and replies if needed. The class is designed to be easily incorporated into an HTTP server. RosettaNet is used in a variety of industries including Semiconductor Manufacturing, Electronic Components, Telecommunications, Logistics, the Chemical Industry (through CIDX), and more.

BASIC OPERATION

When a RosettaNet request comes in, you should first call the ReadRequest method to read in the request. Once this is done, you must parse the headers and the request. You first parse the headers of the HTTP request using the ParseHeaders method. You may then set the appropriate certificates by setting the Certificate to your private key certificate and SignerCert to your trading partner's (signing) certificate.

The next step is to parse the RosettaNet message using ParseRequest. This method decrypts the message if needed. The class then parses all parts of the message. The preamble, delivery, and service headers are all parsed into the PreambleHeaderXML, DeliveryHeaderXML, and the ServiceHeaderXML, respectively. It also parses the actual body of the RosettaNet message, or the PIP, into the ServiceContent. Any attachments that may be in the message are parsed into the attachment array, and may be accessed via the Attachments property.

The class can also be used to handle synchronous responses. In order to complete this task, the receiver must first reset all header properties to values appropriate for a response. This may include changing values such as the MessageSenderId, MessageReceiverId, ActionCode, etc. The ServiceContent should then be set to a response indicating the state of the transaction. A typical response is a simple receipt acknowledgement, which has all qualities of a valid RosettaNet action, but is simply a receipt. Once these properties have been set, the message is ready to be sent using the SendResponse method.

NOTE: the RNIFReceiver Class can only handle sending synchronous responses. If an asynchronous response is desired, or required by a particular Partner Interface Process (PIP), you should use the RNIFSender class.

The following example illustrates how to use the class within a web page.

EXAMPLE


RNIFReceiver.ReadRequest();
RNIFReceiver.Certificate = new Certificate(CertStoreTypes.cstPFXFile,          // Store type
                                           "\my_server_directory\encrypt.pfx", // File name
                                           "my password",                      // Password
                                           "CN=Encrypt");                      // Subject

RNIFReceiver.SignerCert = new Certificate("\my_server_directory\partnercert.cer");
RNIFReceiver.ParseHeaders();
RNIFReceiver.ParseRequest();

The server can then get the data from the preamble header, delivery header, service header, and the PIP content from their properties: PreambleHeaderXML, DeliveryHeaderXML, ServiceHeaderXML<;, and the ServiceContent, respectively. The message may then be easily processed, as all details of the transaction will be populated into their respective properties.

NOTE: Any attachments are saved by the name in the corresponding Attachments entry, and in the directory specified by the receiver. The directory is specified using the AttachmentOutputPath config property, and must be specified before you read and process the request. For example:


RNIFReceiver.Config("AttachmentOutputPath='\my_server_directory\Attachments'")

NOTE: In the above example, a receipt acknowledgement was not sent.

Additional functionality allows the user to examine details of the client's request, to permit certain types of errors, or to customize the RosettaNet response message. See the property and method list for details.

Property List


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

ActionCodeThe code for this action.
ActionMessageWhether or not this message is an action message.
ActionMessageStandardNameThe name of the standard used to create this action.
ActionMessageStandardVersionThe version of the standard used to create this action.
AttachmentsA collection of files attached to the current RNIF message.
BusinessActivityThis property denotes the type of business activity.
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.
CertFingerprintThe hex-encoded, 16-byte MD5 fingerprint of the certificate.
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.
CertSignatureAlgorithmText 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-separated lists of alternative subject names of the certificate.
CertThumbprintMD5MD5 hash of the certificate.
CertThumbprintSHA1SHA1 hash of the certificate.
CertThumbprintSHA256SHA256 hash of the certificate.
CertUsageText description of UsageFlags .
CertUsageFlagsFlags that show intended use for the certificate.
CertVersionThe certificate's version number.
DeliveryHeaderXMLThe complete XML data from the Delivery Header.
EncryptionAlgorithmThe algorithm used to encrypt the EDI data.
EncryptionTypeThe encryption type for RNIF 2.0.
FromRoleThe business role of the entity that originated this message.
FromServiceThe service that originated this message.
GlobalUsageCodeA universal code describing basic usage for this message.
MessageDateTimeThe time at which this message was sent.
MessageReceiverIdIdentity of the entity receiving this message.
MessageReceiverLocationLocation of the entity receiving this message.
MessageSenderIdIdentity of the entity that sent this message.
MessageSenderLocationLocation of the entity that sent this message.
MessageTrackingIdUnique value that identifies this message.
OriginalActionCodeThe action code of the original message.
OriginalMessageStandardNameThe name of the standard used to create the original message.
OriginalMessageStandardVersionThe version of the standard used to create the original message.
OriginalMessageTrackingIdTracking identifier for the original message.
PartnerIdIdentity of the partner.
PartnerKnownWhether or not the partner is known.
PartnerLocationLocation of the partner.
PartnerPIPBindingIdThe partner-defined PIP payload binding ID.
PartnerURLA URL to which replies must be sent if the partner is unknown.
PIPCodeRosettaNet PIP code of this message.
PIPInstanceIdThe Id of this PIP instance.
PIPVersionRosettaNet PIP version of this message.
PreambleHeaderXMLThe complete XML data from the Preamble Header.
QOSSpecificationsSpecifies quality of service constraints for this message.
RecipientCertEffectiveDateThe date which this certificate becomes valid.
RecipientCertEncodedThe certificate (PEM/base64 encoded).
RecipientCertExpirationDateThe date the certificate expires.
RecipientCertExtendedKeyUsageA comma-delimited list of extended key usage identifiers.
RecipientCertFingerprintThe hex-encoded, 16-byte MD5 fingerprint of the certificate.
RecipientCertIssuerThe issuer of the certificate.
RecipientCertKeyPasswordThe password for the certificate's private key (if any).
RecipientCertPrivateKeyThe private key of the certificate (if available).
RecipientCertPrivateKeyAvailableShows whether a PrivateKey is available for the selected certificate.
RecipientCertPrivateKeyContainerThe name of the PrivateKey container for the certificate (if available).
RecipientCertPublicKeyThe public key of the certificate.
RecipientCertPublicKeyAlgorithmTextual description of the public key algorithm of the certificate.
RecipientCertPublicKeyLengthThe length of the certificate public key (in bits).
RecipientCertSerialNumberThe serial number of the certificate encoded as a string.
RecipientCertSignatureAlgorithmText description of the signature algorithm of the certificate.
RecipientCertStoreThe name of the certificate store for the client certificate.
RecipientCertStorePasswordIf 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.
RecipientCertStoreTypeThe type of certificate store for this certificate.
RecipientCertSubjectThe subject of the certificate used for client authentication.
RecipientCertSubjectAltNamesA comma-separated lists of alternative subject names of the certificate.
RecipientCertThumbprintMD5MD5 hash of the certificate.
RecipientCertThumbprintSHA1SHA1 hash of the certificate.
RecipientCertThumbprintSHA256SHA256 hash of the certificate.
RecipientCertUsageText description of UsageFlags .
RecipientCertUsageFlagsFlags that show intended use for the certificate.
RecipientCertVersionThe certificate's version number.
ReplyMessageWhether or not this message is a reply to another message.
RequestThe HTTP request to be processed.
RequestHeadersThe HTTP headers in the RNIF request.
RequestHeadersStringThe HTTP headers in the RNIF request.
ResponseTypeRequested response type. Available only in RNIF 2.0.
RNIFVersionThe RNIF Standard Version used to generate this message.
SecureTransportRequiredIndicates that security is required when forwarding this message.
ServiceContentThe PIP message data.
ServiceHeaderXMLThe complete XML data from the Service Header.
SignalCodeThe code for this signal.
SignalMessageWhether or not this message is a signal.
SignalVersionThe version of this signal.
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.
SignerCertFingerprintThe hex-encoded, 16-byte MD5 fingerprint of the certificate.
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.
SignerCertSignatureAlgorithmText 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-separated lists of alternative subject names of the certificate.
SignerCertThumbprintMD5MD5 hash of the certificate.
SignerCertThumbprintSHA1SHA1 hash of the certificate.
SignerCertThumbprintSHA256SHA256 hash of the certificate.
SignerCertUsageText description of UsageFlags .
SignerCertUsageFlagsFlags that show intended use for the certificate.
SignerCertVersionThe certificate's version number.
StandardNameThe name of the standard used to create this message.
StandardVersionThe version of the standard used to create this message.
ToRoleThe role of the entity receiving this message.
ToServiceThe service for which this message is bound.

Method List


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

ConfigSets or retrieves a configuration setting.
ParseHeadersProcesses the headers, and populates the appropriate properties.
ParseRequestParses the MIME message and determines the Message .
ReadRequestReads the RNIF request from the given HTTP servlet request.
RequestHeaderGets the specified header from the HTTP request.
ResetThis property is used to reset all attributes of the Rnifreceiver instance.
SendResponseOptional. Acknowledges the incoming request.

Event List


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

ErrorInformation about errors during data delivery.

Configuration Settings


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

AttachmentOutputPathSpecifies a path on disk to which attachments will be saved.
ExpectedVersionThe RNIF document version that the RNIFReceiver is expecting to receive.
FromPartnerClassificationCodeCode identifying the sending partner's function in the supply chain.
GlobalProcessCodeBusiness process identifier e.g. 'Manage Product Subscriptions'. This code is the name of a PIP specification document.
HTTPStatusCodeThe HTTP status code to send in the response.
MessageDigestThe base-64 encoded hash of the received data.
RequireEncryptionWhether encryption is required when processing received messages.
RequireSignatureWhether a signature is required when processing received messages.
SignatureAlgorithmSignature algorithm to be used in outgoing messages.
ToPartnerClassificationCodeCode identifying the receiving partner's function in the supply chain.
TransactionCodeService transaction dialog. The code is the name of the business activity and the transaction dialog in the PIP specification document.
TransactionIdA unique alpha-numeric identifier that represents a specific instance of an business process, business transaction, business action or business signal. The instance identifier must be unique for a particular instance of a business process, business transaction, business action and business signal.
TransferredDataThe full body of the incoming request.
TransferredHeadersThe HTTP headers of the incoming request.
BuildInfoInformation about the product's build.
CodePageThe system code page used for Unicode to Multibyte translations.
LicenseInfoInformation about the current license.
UseInternalSecurityAPITells the component whether or not to use the system security libraries or an internal implementation.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks EDI 2020 macOS Edition - Version 20.0 [Build 8203]