RNIFReceiver Component

Properties   Methods   Events   Config 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 component 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 component 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 component 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 Component 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 component.

The following example illustrates how to use the component 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 component 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.
CertificateThe encryption certificate.
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.
RecipientCertThe encryption certificate of the recipient.
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.
SignerCertYour trading partner's signing certificate.
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 component 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.
SetAttachmentOutputStreamDecodes the specified attachment to the output stream.
SetRequestStreamSets the stream from which the component will read the RNIF request.

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.

ErrorFired when information is available about errors during data delivery.

Config Settings


The following is a list of config settings for the component 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.
GUIAvailableWhether or not a message loop is available for processing events.
LicenseInfoInformation about the current license.
MaskSensitiveWhether sensitive data is masked in log messages.
UseFIPSCompliantAPITells the component whether or not to use FIPS certified APIs.
UseInternalSecurityAPIWhether or not to use the system security libraries or an internal implementation.

ActionCode Property (RNIFReceiver Component)

The code for this action.

Syntax

public string ActionCode { get; set; }
Public Property ActionCode As String

Default Value

""

Remarks

This property is a string which denotes the type of action for the current RosettaNet message, if it is an action. If it is a reply, then the ActionCode describes the type of action that the message is in reply to. An example is a "Purchase Order Request Action."

This property is a field of the service header.

ActionMessage Property (RNIFReceiver Component)

Whether or not this message is an action message.

Syntax

public bool ActionMessage { get; set; }
Public Property ActionMessage As Boolean

Default Value

False

Remarks

This property indicates whether or not the message is an action message. A RosettaNet action is defined as a message which requires or requests a business activity. A "PurchaseOrderRequestMessage" is a valid Business Action message, as is the corresponding "PurchaseOrderConfirmMessage". The latter, however, is also a reply to the original action request.

Receipt acknowledgments are considered Signals, and not Business Action messages, even though they contain all of the properties of a valid Business Action message.

This property is a field of the service header.

ActionMessageStandardName Property (RNIFReceiver Component)

The name of the standard used to create this action.

Syntax

public string ActionMessageStandardName { get; set; }
Public Property ActionMessageStandardName As String

Default Value

""

Remarks

While the RosettaNet community has a set of widely adopted, pre-defined and standardized message templates, it also allows for business partners to agree on specification geared more toward their particular needs. If a special, non-RosettaNet standard is to be used to create the action message, the name of the standard must be reported in ActionMessageStandardName and the version in ActionMessageStandardVersion. This way, the receiving entity can know how to process and interpret the incoming business message.

Since replies may sent in response to a message created using such a specialized standard, the standard used to create the original message should be referenced using the OriginalMessageStandardName and OriginalMessageStandardVersion when creating or processing replies.

This property is a field of the service header.

ActionMessageStandardVersion Property (RNIFReceiver Component)

The version of the standard used to create this action.

Syntax

public string ActionMessageStandardVersion { get; set; }
Public Property ActionMessageStandardVersion As String

Default Value

""

Remarks

While the RosettaNet community has a set of widely adopted, pre-defined and standardized message templates, it also allows for business partners to agree on specification geared more toward their particular needs. If a special, non-RosettaNet standard is to be used to create the action message, the name of the standard must be reported in ActionMessageStandardName and the version in ActionMessageStandardVersion. This way, the receiving entity can know how to process and interpret the incoming business message.

Since replies may sent in response to a message created using such a specialized standard, the standard used to create the original message should be referenced using the OriginalMessageStandardName and OriginalMessageStandardVersion when creating or processing replies.

This property is a field of the service header.

Attachments Property (RNIFReceiver Component)

A collection of files attached to the current RNIF message.

Syntax

public RNIFAttachmentList Attachments { get; }
Public Property Attachments As RNIFAttachmentList

Remarks

Some RosettaNet PIPs, and potentially any non-RosettaNet standards, allow for extra files or data to be attached to the RosettaNet business document. Since the RosettaNet document is MIME-encoded, there are no specific limitations on the number of attachments. The message attachments are included in the payload container with the ServiceContent, so if EncryptionType is set to any non-zero value (i.e., etEncryptPayloadContainer or etEncryptServiceContent) the attachments will be encrypted as well.

The message attachments are described by the RNIFAttachment objects stored within the Attachments property.

This property is a field of the service header.

NOTE: You can change the path to which the files are saved in with the AttachmentOutputPath config property.

This property is not available at design time.

Please refer to the RNIFAttachment type for a complete list of fields.

BusinessActivity Property (RNIFReceiver Component)

This property denotes the type of business activity.

Syntax

public string BusinessActivity { get; set; }
Public Property BusinessActivity As String

Default Value

""

Remarks

This property simply tells the receiver what type of business activity the RosettaNet document that is sent refers to. An example is: "Create Purchase Order".

Certificate Property (RNIFReceiver Component)

The encryption certificate.

Syntax

public Certificate Certificate { get; set; }
Public Property Certificate As Certificate

Remarks

The digital certificate that the component will use to decrypt incoming RosettaNet messages and sign responses. If set prior to calling ParseRequest, the certificate will be used to decrypt the incoming message. If set prior to calling SendResponse, the certificate will be used to sign the response. Certificate must be set to a private key certificate.

Please refer to the Certificate type for a complete list of fields.

DeliveryHeaderXML Property (RNIFReceiver Component)

The complete XML data from the Delivery Header

Syntax

public string DeliveryHeaderXML { get; set; }
Public Property DeliveryHeaderXML As String

Default Value

""

Remarks

This property is the full XML data of the RosettaNet message Delivery Header. This header contains information about the sending and receiving business processes, as well as tracking data for the message itself. This header was introduced by RNIF 2.0 to speed the movement of RosettaNet messages through message-forwarding hubs.

This property is an aggregate property containing XML either generated from or parsed into various other properties of the component. If the value of a related property changes, this property will be updated the next time it is polled and the current valid XML will be returned. When this property is set directly, the component will automatically parse the XML and validate the content of the header to ensure that all required fields contain appropriate values. Once this property has been set and validated, the following properties will be populated:

NOTE: If RNIFVersion is set to v1, the value of this property is ignored when generating messages.

EncryptionAlgorithm Property (RNIFReceiver Component)

The algorithm used to encrypt the EDI data.

Syntax

public string EncryptionAlgorithm { get; set; }
Public Property EncryptionAlgorithm As String

Default Value

"3DES"

Remarks

If RecipientCerts contains a valid certificate, the data will be encrypted using this certificate and the algorithm specified in EncryptionAlgorithm. If EncryptionAlgorithm is set to the empty string, the data will not be encrypted.

The component supports "3DES", or industry-standard 168-bit Triple-DES encryption.

The component supports "AES" encryption with a default keysize of 128 bits. You may also set "AESCBC192" or "AESCBC256" for 192- and 256-bit keysizes.

Possible values are:

  • 3DES (default)
  • DES
  • AESCBC128
  • AESCBC192
  • AESCBC256
  • AESGCM128
  • AESGCM192
  • AESGCM256

EncryptionType Property (RNIFReceiver Component)

The encryption type for RNIF 2.0.

Syntax

public RnifreceiverEncryptionTypes EncryptionType { get; set; }

enum RnifreceiverEncryptionTypes { etNoEncryption, etEncryptServiceContent, etEncryptPayloadContainer }
Public Property EncryptionType As RnifreceiverEncryptionTypes

Enum RnifreceiverEncryptionTypes etNoEncryption etEncryptServiceContent etEncryptPayloadContainer End Enum

Default Value

0

Remarks

RNIF 2.0 allows encryption of a message at three different levels:

0 (etNoEncryption)The entire contents of the RosettaNet message are unencrypted.
1 (etEncryptServiceContent)The service content and attachments are encrypted.
2 (etEncryptPayloadContainer)The service header, content, and attachments are encrypted.

NOTE: By default, the value is etNoEncryption. Therefore, if encryption is desired, the EncryptionType property must be specified, even if a certificate is supplied through the certificate properties. See RecipientCert for more information on specifying a certificate for encryption.

This property is not available at design time.

FromRole Property (RNIFReceiver Component)

The business role of the entity that originated this message.

Syntax

public string FromRole { get; set; }
Public Property FromRole As String

Default Value

""

Remarks

This property describes what role the process sending this message plays in the business model. This may be a one-word description, e.g. "Buyer".

This property is a field of the service header.

FromService Property (RNIFReceiver Component)

The service that originated this message.

Syntax

public string FromService { get; set; }
Public Property FromService As String

Default Value

""

Remarks

This property describes the type of service that is being provided by the sender of this message. This can be a short description of the service being provided, e.g. "Buyer Service".

This property is a field of the service header.

GlobalUsageCode Property (RNIFReceiver Component)

A universal code describing basic usage for this message.

Syntax

public RnifreceiverGlobalUsageCodes GlobalUsageCode { get; set; }

enum RnifreceiverGlobalUsageCodes { gucTest, gucProduction }
Public Property GlobalUsageCode As RnifreceiverGlobalUsageCodes

Enum RnifreceiverGlobalUsageCodes gucTest gucProduction End Enum

Default Value

0

Remarks

GlobalUsageCode is a value that specifies how the RosettaNet message is to be treated from a business standpoint.This property currently only supports the following two values:

  • 0 (gucTest)
  • 1 (gucProduction)

This property is a field of the service header.

MessageDateTime Property (RNIFReceiver Component)

The time at which this message was sent.

Syntax

public string MessageDateTime { get; set; }
Public Property MessageDateTime As String

Default Value

""

Remarks

This property is a date and time stamp representing the moment the RosettaNet message was created. The sending process should set this value as close to the time when it sends as possible. The accepted standard for date fields in RosettaNet messages uses the format "YYYYMMDDThhmmss.sssZ", e.g. "20001121T145200.000Z". The format is interpreted as follows:

YYYYThis is the year of the time stamp.
MMThis is the month of the time stamp.
DDThis specifies the day of the month.
TThe 'T' denotes the separation between the date and the time stamps.
hhThis is the hour, in 24 hour format in which the message was sent.
mmThis specifies the minutes at which the message was sent.
ss.sss This is the seconds at which the message was sent. Everything after the decimal is a fraction of a seconds.
ZThis is a delimiter for the end of the date/time stamp.

The message in the example was sent at 2:52:00.000 PM November 11, 2000.

This property is a field of the delivery header.

MessageReceiverId Property (RNIFReceiver Component)

Identity of the entity receiving this message.

Syntax

public string MessageReceiverId { get; set; }
Public Property MessageReceiverId As String

Default Value

""

Remarks

MessageReceiverId describes the identity of the receiver for this message. It is specifically the DUNS number for the trading partner.

This property is a field of the delivery header.

MessageReceiverLocation Property (RNIFReceiver Component)

Location of the entity receiving this message.

Syntax

public string MessageReceiverLocation { get; set; }
Public Property MessageReceiverLocation As String

Default Value

""

Remarks

This property describes the location of the receiver for this message. The location is not an address, but may be a city name.

This property is a field of the delivery header.

MessageSenderId Property (RNIFReceiver Component)

Identity of the entity that sent this message.

Syntax

public string MessageSenderId { get; set; }
Public Property MessageSenderId As String

Default Value

""

Remarks

MessageSenderId describes the identity of the sender for this message. It is specifically the DUNS number for the trading partner.

This property is a field of the delivery header.

MessageSenderLocation Property (RNIFReceiver Component)

Location of the entity that sent this message.

Syntax

public string MessageSenderLocation { get; set; }
Public Property MessageSenderLocation As String

Default Value

""

Remarks

This property describes the location of the sender for this message. The location is not an address, but may be a city name.

This property is a field of the delivery header.

MessageTrackingId Property (RNIFReceiver Component)

Unique value that identifies this message.

Syntax

public string MessageTrackingId { get; set; }
Public Property MessageTrackingId As String

Default Value

""

Remarks

MessageTrackingId is a unique instance identifier for this message. This value is used by both parties to keep a record of all the messages it receives. It is the responsibility of the sender to ensure that this value is unique for each transaction. The receiving entity should respond with an error if it receives a message with a previously used tracking id. This value can be used to persist any information relevant to the current business process to an external database .

This property is a field of the delivery header.

OriginalActionCode Property (RNIFReceiver Component)

The action code of the original message.

Syntax

public string OriginalActionCode { get; set; }
Public Property OriginalActionCode As String

Default Value

""

Remarks

This property describes the action code of the original message. This is useful when acquiring or processing replies. This tells a process what the original action was which started the current business process of actions and replies.

This property is a field of the service header.

OriginalMessageStandardName Property (RNIFReceiver Component)

The name of the standard used to create the original message.

Syntax

public string OriginalMessageStandardName { get; set; }
Public Property OriginalMessageStandardName As String

Default Value

""

Remarks

While the RosettaNet community has a set of widely adopted, pre-defined and standardized message templates, it also allows for business partners to agree on specification geared more toward their particular needs. If a special, non-RosettaNet standard is to be used to create the action message, the name of the standard must be reported in ActionMessageStandardName and the version in ActionMessageStandardVersion. This way, the receiving entity can know how to process and interpret the incoming business message.

Since replies may sent in response to a message created using such a specialized standard, the standard used to create the original message should be referenced using the OriginalMessageStandardName and OriginalMessageStandardVersion when creating or processing replies.

This property is a field of the service header.

OriginalMessageStandardVersion Property (RNIFReceiver Component)

The version of the standard used to create the original message.

Syntax

public string OriginalMessageStandardVersion { get; set; }
Public Property OriginalMessageStandardVersion As String

Default Value

""

Remarks

While the RosettaNet community has a set of widely adopted, pre-defined and standardized message templates, it also allows for business partners to agree on specification geared more toward their particular needs. If a special, non-RosettaNet standard is to be used to create the action message, the name of the standard must be reported in ActionMessageStandardName and the version in ActionMessageStandardVersion. This way, the receiving entity can know how to process and interpret the incoming business message.

Since replies may sent in response to a message created using such a specialized standard, the standard used to create the original message should be referenced using the OriginalMessageStandardName and OriginalMessageStandardVersion when creating or processing replies.

This property is a field of the service header.

OriginalMessageTrackingId Property (RNIFReceiver Component)

Tracking identifier for the original message.

Syntax

public string OriginalMessageTrackingId { get; set; }
Public Property OriginalMessageTrackingId As String

Default Value

""

Remarks

This property contains the identifier used to track the original message. This can be used when processing replies to previous actions to look up details about the original action that started the current business process. Complementary to the MessageTrackingId, this property can be used to retrieve any information relevant to the current business process from an external database.

This property is a field of the service header.

PartnerId Property (RNIFReceiver Component)

Identity of the partner.

Syntax

public string PartnerId { get; set; }
Public Property PartnerId As String

Default Value

""

Remarks

PartnerKnown denotes whether or not the initiating partner for the current transaction is known. If the partner is known the sender should specify their business identifier using the PartnerId property. This allows the receiving entity to look up information on how to reply, or forward the current message, to the partner in question. Also, PartnerLocation can be specified. This property is not an address, but may be a city.

NOTE: If the partner is not known, then a PartnerURL MUST be specified in order for the messages and responses to reach their appropriate destinations.

This property is a field of the service header.

PartnerKnown Property (RNIFReceiver Component)

Whether or not the partner is known.

Syntax

public bool PartnerKnown { get; set; }
Public Property PartnerKnown As Boolean

Default Value

False

Remarks

PartnerKnown denotes whether or not the initiating partner for the current transaction is known. If the partner is known the sender should specify their business identifier using the PartnerId property. This allows the receiving entity to look up information on how to reply, or forward the current message, to the partner in question. Also, PartnerLocation can be specified. This property is not an address, but may be a city.

NOTE: If the partner is not known, then a PartnerURL MUST be specified in order for the messages and responses to reach their appropriate destinations.

This property is a field of the service header.

PartnerLocation Property (RNIFReceiver Component)

Location of the partner.

Syntax

public string PartnerLocation { get; set; }
Public Property PartnerLocation As String

Default Value

""

Remarks

PartnerKnown denotes whether or not the initiating partner for the current transaction is known. If the partner is known the sender should specify their business identifier using the PartnerId property. This allows the receiving entity to look up information on how to reply, or forward the current message, to the partner in question. Also, PartnerLocation can be specified. This property is not an address, but may be a city.

NOTE: If the partner is not known, then a PartnerURL MUST be specified in order for the messages and responses to reach their appropriate destinations.

This property is a field of the service header.

PartnerPIPBindingId Property (RNIFReceiver Component)

The partner-defined PIP payload binding ID.

Syntax

public string PartnerPIPBindingId { get; set; }
Public Property PartnerPIPBindingId As String

Default Value

""

Remarks

This property is only defined when non-RosettaNet content is bound in the payload portion of the RosettaNet Business message. This may only be used with PIPs which specifically support the use of non-RosettaNet content. Both trading partners must agree on the use of non-RosettaNet content, and on the Id being used. The Id is used to identify the two partners' own version of the PIP used.

NOTE: This property MUST be set when non-RosettaNet content is being sent in the payload, and MUST NOT be set when regular PIP's are being used.

PartnerURL Property (RNIFReceiver Component)

A URL to which replies must be sent if the partner is unknown.

Syntax

public string PartnerURL { get; set; }
Public Property PartnerURL As String

Default Value

""

Remarks

PartnerKnown denotes whether or not the initiating partner for the current transaction is known. If the partner is known the sender should specify their business identifier using the PartnerId property. This allows the receiving entity to look up information on how to reply, or forward the current message, to the partner in question. Also, PartnerLocation can be specified. This property is not an address, but may be a city.

NOTE: If the partner is not known, then a PartnerURL MUST be specified in order for the messages and responses to reach their appropriate destinations.

This property is a field of the service header.

This property is a field of the service header.

NOTE: If partner is unknown and this value is not specified, further processing may not be possible.

PIPCode Property (RNIFReceiver Component)

RosettaNet PIP code of this message.

Syntax

public string PIPCode { get; set; }
Public Property PIPCode As String

Default Value

""

Remarks

The ServiceContent of a RosettaNet message is an instance of a pre-defined, widely accepted and standardized RosettaNet business action document called a Partner Interface Process (PIP). These documents define the most common business action scenarios, as well as the most common information used by a company to complete transactions under these scenarios. Each PIP has its own code, and many PIPs are defined in multiple versions. To ensure that the receiving partner knows how to interpret the PIP instance, the code should be set in PIPCode and the version in PIPVersion.

Since no two business actions are exactly the same, each instance of PIP needs to have an associated identifier so that information about the transaction may be easily persisted to and retrieved from an external database. These instance ids are reported by the PIPInstanceId property. It is up to the sending client to ensure that this value is unique. The receiver should respond with an error if it receives a PIP instance id that has already been used.

This property is a field of the service header.

PIPInstanceId Property (RNIFReceiver Component)

The Id of this PIP instance.

Syntax

public string PIPInstanceId { get; set; }
Public Property PIPInstanceId As String

Default Value

""

Remarks

The ServiceContent of a RosettaNet message is an instance of a pre-defined, widely accepted and standardized RosettaNet business action document called a Partner Interface Process (PIP). These documents define the most common business action scenarios, as well as the most common information used by a company to complete transactions under these scenarios. Each PIP has its own code, and many PIPs are defined in multiple versions. To ensure that the receiving partner knows how to interpret the PIP instance, the code should be set in PIPCode and the version in PIPVersion.

Since no two business actions are exactly the same, each instance of PIP needs to have an associated identifier so that information about the transaction may be easily persisted to and retrieved from an external database. These instance ids are reported by the PIPInstanceId property. It is up to the sending client to ensure that this value is unique. The receiver should respond with an error if it receives a PIP instance id that has already been used.

This property is a field of the service header.

PIPVersion Property (RNIFReceiver Component)

RosettaNet PIP version of this message.

Syntax

public string PIPVersion { get; set; }
Public Property PIPVersion As String

Default Value

""

Remarks

The ServiceContent of a RosettaNet message is an instance of a pre-defined, widely accepted and standardized RosettaNet business action document called a Partner Interface Process (PIP). These documents define the most common business action scenarios, as well as the most common information used by a company to complete transactions under these scenarios. Each PIP has its own code, and many PIPs are defined in multiple versions. To ensure that the receiving partner knows how to interpret the PIP instance, the code should be set in PIPCode and the version in PIPVersion.

Since no two business actions are exactly the same, each instance of PIP needs to have an associated identifier so that information about the transaction may be easily persisted to and retrieved from an external database. These instance ids are reported by the PIPInstanceId property. It is up to the sending client to ensure that this value is unique. The receiver should respond with an error if it receives a PIP instance id that has already been used.

This property is a field of the service header.

PreambleHeaderXML Property (RNIFReceiver Component)

The complete XML data from the Preamble Header.

Syntax

public string PreambleHeaderXML { get; set; }
Public Property PreambleHeaderXML As String

Default Value

""

Remarks

The contents of PreambleHeaderXML are the full XML data RosettaNet message Preamble Header. This header includes information about the version of the RosettaNet Implementation Framework (RNIF) protocol used to create the message.

This property is an aggregate property containing XML either generated from or parsed into various other properties of the component. If the value of a related property changes, this property will be updated the next time it is polled and the current valid XML will be returned. When this property is set directly, the component will automatically parse the XML and validate the content of the header to ensure that all required fields contain appropriate values. Once this property has been set and validated, the following properties will be populated:

QOSSpecifications Property (RNIFReceiver Component)

Specifies quality of service constraints for this message.

Syntax

public QOSSpecificationList QOSSpecifications { get; }
Public Property QOSSpecifications As QOSSpecificationList

Remarks

Version 2.0 of the RosettaNet Implementation Framework introduced a set of Quality of Service (QOS) elements to ensure future backward compatibility.

The component supports these future QOS options through the QOSSpecifications collection.

This property is a field of the service header.

NOTE: there are no valid values for the quality of service parameters at this time, therefore this property may be ignored by the RNIF entity.

This property is not available at design time.

Please refer to the QOSSpecification type for a complete list of fields.

RecipientCert Property (RNIFReceiver Component)

The encryption certificate of the recipient.

Syntax

public Certificate RecipientCert { get; set; }
Public Property RecipientCert As Certificate

Remarks

The encryption certificate of the recipient. If this property is specified, the message content will be encrypted using the algorithm given by EncryptionAlgorithm when a response is sent using SendResponse.

If set, this property should be a public key instance of Certificate.

Please refer to the Certificate type for a complete list of fields.

ReplyMessage Property (RNIFReceiver Component)

Whether or not this message is a reply to another message.

Syntax

public bool ReplyMessage { get; set; }
Public Property ReplyMessage As Boolean

Default Value

False

Remarks

This property is a boolean value indicating whether or not the message is a reply to a previous message or not. The first message in any business process is always an action message. Reply messages may be an update, another action, or a signal.

Some actions may request data, in which case a reply RosettaNet message must be sent with the data that was requested. All action messages sent in response to the original action message are considered replies.

When sending a reply, this property should be set to "True" to tell the receiver how to interpret and handle the message.

This property is a field of the service header.

Request Property (RNIFReceiver Component)

The HTTP request to be processed.

Syntax

public string Request { get; set; }
public byte[] RequestB { get; set; }
Public Property Request As String
Public Property RequestB As Byte()

Default Value

""

Remarks

This property holds the body of the request to be processed. The HTTP headers may be set separately in RequestHeaders or may be included in Request. If they are included, a double CRLF pair should be used to separate the headers from the body.

Typically, the request may be read directly from the HTTP context by calling ReadRequest, without setting this property.

When ReadRequest is called the contents of Request are overwritten.

RequestHeaders Property (RNIFReceiver Component)

The HTTP headers in the RNIF request.

Syntax

public HeaderList RequestHeaders { get; }
Public Property RequestHeaders As HeaderList

Remarks

A collection of headers. These will include RNIF-specific headers as well as general HTTP headers.

When assigning an RNIF request to the component, the headers may be included in Request or specified separately in RequestHeaders. If the headers are included in Request they will be parsed out whenever ReadRequest, ParseRequest, or ProcessRequest is invoked.

Please refer to the Header type for a complete list of fields.

RequestHeadersString Property (RNIFReceiver Component)

The HTTP headers in the RNIF request.

Syntax

public string RequestHeadersString { get; set; }
Public Property RequestHeadersString As String

Default Value

""

Remarks

The entire list of headers, concatenated into a single string. These will include RNIF-specific headers as well as general HTTP headers. You may access specific headers through RequestHeaders.

When assigning an RNIF request to the component, the headers may be included in Request or specified separately in RequestHeaders or RequestHeadersString. If the headers are included in Request they will be parsed out whenever ReadRequest, ParseRequest, or ProcessRequest is invoked.

ResponseType Property (RNIFReceiver Component)

Requested response type. Available only in RNIF 2.0.

Syntax

public RnifreceiverResponseTypes ResponseType { get; }

enum RnifreceiverResponseTypes { rtSync, rtAsync }
Public ReadOnly Property ResponseType As RnifreceiverResponseTypes

Enum RnifreceiverResponseTypes rtSync rtAsync End Enum

Default Value

0

Remarks

This property tells the receiver which type of response the sender is expecting.

The following types of supported responses are:

rtSyncThe response will be received on the same HTTP session as the initial request.
rtAsyncThe response will be received later.

This property is only available in RNIF version 2.0.

This property is read-only and not available at design time.

RNIFVersion Property (RNIFReceiver Component)

The RNIF Standard Version used to generate this message.

Syntax

public RnifreceiverRNIFVersions RNIFVersion { get; }

enum RnifreceiverRNIFVersions { v1, v2 }
Public ReadOnly Property RNIFVersion As RnifreceiverRNIFVersions

Enum RnifreceiverRNIFVersions v1 v2 End Enum

Default Value

0

Remarks

This property describes which standard version of RNIF was used to generate this message. Possible values are::

v1RosettaNet version 1.1
v2RosettaNet version 2.0

This property is read-only and not available at design time.

SecureTransportRequired Property (RNIFReceiver Component)

Indicates that security is required when forwarding this message.

Syntax

public bool SecureTransportRequired { get; set; }
Public Property SecureTransportRequired As Boolean

Default Value

False

Remarks

This property is a boolean value which denotes whether or not security is required when forwarding this message. Since RosettaNet messages are business messages, secure transport is often required. See RNIFSender for more information on sending messages over a secure transport.

This property is a field of the delivery header.

ServiceContent Property (RNIFReceiver Component)

The PIP message data.

Syntax

public string ServiceContent { get; set; }
Public Property ServiceContent As String

Default Value

""

Remarks

The ServiceContent property contains the PIP message data. This is the body of the message which contains the request, action, or reply being sent from one business process to another.

There are specific formats to which this data must adhere. These formats are specified by the RosettaNet community in the form of Partner Interface Processes (PIPs). Each PIP instance also has an ID associated with it which is stored in the PIPInstanceId property.

ServiceHeaderXML Property (RNIFReceiver Component)

The complete XML data from the Service Header.

Syntax

public string ServiceHeaderXML { get; set; }
Public Property ServiceHeaderXML As String

Default Value

""

Remarks

ServiceHeaderXML contains the full XML data of the RosettaNet message Service Header. This header includes information about the contents of the RosettaNet message itself. It contains information about the type of message, the PIP used to create the service content, and the various attachments as well as information about the business partners involved in the transaction, such as each entity's role.

This property is an aggregate property containing XML either generated from or parsed into various other properties of the component. If the value of a related property changes, this property will be updated the next time it is polled and the current valid XML will be returned. When this property is set directly, the component will automatically parse the XML and validate the content of the header to ensure that all required fields contain appropriate values. Once this property has been set and validated, the following properties will be populated:

SignalCode Property (RNIFReceiver Component)

The code for this signal.

Syntax

public string SignalCode { get; set; }
Public Property SignalCode As String

Default Value

""

Remarks

This is the code for the signal message received. This property is only set if the message is a signal. The code denotes what type of signal is being received, or sent.

SignalMessage Property (RNIFReceiver Component)

Whether or not this message is a signal.

Syntax

public bool SignalMessage { get; set; }
Public Property SignalMessage As Boolean

Default Value

False

Remarks

SignalMessage is a boolean value indicating whether or not the message is a signal. Signals do not contain content that is of business nature. Instead, they are simply acknowledgments to business actions.

RNIF 2.0 specifies two types of signals: a positive, and a negative. A positive signal has all of the properties of a valid RosettaNet action message, however it is simply an acknowledgement of receipt of a valid Business Action message. A negative signal is an acknowledgement sent to notify the originating entity of an error. In RNIF 2.0, there is only one type of exception message, as opposed to the three types in RNIF 1.1.

NOTE: only Business Actions may be acknowledged, Signals cannot.

This property is a field of the service header.

SignalVersion Property (RNIFReceiver Component)

The version of this signal.

Syntax

public string SignalVersion { get; set; }
Public Property SignalVersion As String

Default Value

""

Remarks

This is the version for the signal message received. This property is only set if the message is a signal. The version denotes what version of signal is being received, or sent.

SignerCert Property (RNIFReceiver Component)

Your trading partner's signing certificate.

Syntax

public Certificate SignerCert { get; set; }
Public Property SignerCert As Certificate

Remarks

This property can be set to your trading partner's signing certificate to verify signatures on incoming RosettaNet messages when calling ParseRequest

This property should be set to a public key instance of Certificate.

This property is not available at design time.

Please refer to the Certificate type for a complete list of fields.

StandardName Property (RNIFReceiver Component)

The name of the standard used to create this message.

Syntax

public string StandardName { get; set; }
Public Property StandardName As String

Default Value

""

Remarks

This property is the name of the standard which was used to create the message. In this case, we are working with RosettaNet, so RosettaNet will always be the StandardName, unless this specification is used to send a non-RosettaNet type message. The type name and version must be specified when this occurs.

This property is a field of the preamble.

StandardVersion Property (RNIFReceiver Component)

The version of the standard used to create this message.

Syntax

public string StandardVersion { get; set; }
Public Property StandardVersion As String

Default Value

""

Remarks

StandardVersion describes the version of the standard used to create this message. In this case, the standard being used is RosettaNet. Therefore, the version will be which version of RosettaNet the sender is using.

This property is a field of the preamble.

ToRole Property (RNIFReceiver Component)

The role of the entity receiving this message.

Syntax

public string ToRole { get; set; }
Public Property ToRole As String

Default Value

""

Remarks

This describes what role the process receiving this message plays in the business model. This may be a one-word description, e.g. "Seller".

This property is a field of the service header.

ToService Property (RNIFReceiver Component)

The service for which this message is bound.

Syntax

public string ToService { get; set; }
Public Property ToService As String

Default Value

""

Remarks

This property describes the type of service that is being provided by the receiver of this message. This can be a short description of the service being provided, e.g. "Seller Service".

This property is a field of the service header.

Config Method (RNIFReceiver Component)

Sets or retrieves a configuration setting.

Syntax

public string Config(string configurationString);

Async Version
public async Task<string> Config(string configurationString);
public async Task<string> Config(string configurationString, CancellationToken cancellationToken);
Public Function Config(ByVal ConfigurationString As String) As String

Async Version
Public Function Config(ByVal ConfigurationString As String) As Task(Of String)
Public Function Config(ByVal ConfigurationString As String, cancellationToken As CancellationToken) As Task(Of String)

Remarks

Config is a generic method available in every component. It is used to set and retrieve configuration settings for the component.

These settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the component, access to these internal properties is provided through the Config method.

To set a configuration setting named PROPERTY, you must call Config("PROPERTY=VALUE"), where VALUE is the value of the setting expressed as a string. For boolean values, use the strings "True", "False", "0", "1", "Yes", or "No" (case does not matter).

To read (query) the value of a configuration setting, you must call Config("PROPERTY"). The value will be returned as a string.

ParseHeaders Method (RNIFReceiver Component)

Processes the headers, and populates the appropriate properties.

Syntax

public void ParseHeaders();

Async Version
public async Task ParseHeaders();
public async Task ParseHeaders(CancellationToken cancellationToken);
Public Sub ParseHeaders()

Async Version
Public Sub ParseHeaders() As Task
Public Sub ParseHeaders(cancellationToken As CancellationToken) As Task

Remarks

When this method is called, the headers are parsed from the HTTP request. Based on the headers, the component will set the RNIFVersion and ResponseType properties. After ParseHeaders is called, these two properties should be polled to determine how the message should be handled.

ParseRequest Method (RNIFReceiver Component)

Parses the MIME message and determines the Message .

Syntax

public void ParseRequest();

Async Version
public async Task ParseRequest();
public async Task ParseRequest(CancellationToken cancellationToken);
Public Sub ParseRequest()

Async Version
Public Sub ParseRequest() As Task
Public Sub ParseRequest(cancellationToken As CancellationToken) As Task

Remarks

Once the message is acquired from the sender and the RNIFVersion and ResponseType properties have been parsed out, this method should be called to MIME decode the RosettaNet message, verify the signature if present, and decrypt the service content if needed. The PreambleHeaderXML, DeliveryHeaderXML, ServiceHeaderXML and ServiceContent properties are all populated, as well as the attachment properties, if any exist.

NOTE: before calling this method, the message must be read from the server via a call to ReadRequest.

ReadRequest Method (RNIFReceiver Component)

Reads the RNIF request from the given HTTP servlet request.

Syntax

public void ReadRequest();

Async Version
public async Task ReadRequest();
public async Task ReadRequest(CancellationToken cancellationToken);
Public Sub ReadRequest()

Async Version
Public Sub ReadRequest() As Task
Public Sub ReadRequest(cancellationToken As CancellationToken) As Task

Remarks

This method acquires the request from the HTTP servlet. Once this is done, ReadRequest then calls ParseHeaders, which parses the headers for the acquired message.

RequestHeader Method (RNIFReceiver Component)

Gets the specified header from the HTTP request.

Syntax

public string RequestHeader(string header);

Async Version
public async Task<string> RequestHeader(string header);
public async Task<string> RequestHeader(string header, CancellationToken cancellationToken);
Public Function RequestHeader(ByVal Header As String) As String

Async Version
Public Function RequestHeader(ByVal Header As String) As Task(Of String)
Public Function RequestHeader(ByVal Header As String, cancellationToken As CancellationToken) As Task(Of String)

Remarks

This method is invoked to return a specific header from the HTTP request. Header is the name of a header from the incoming HTTP request. The method will return either the value of that header or the empty string if the header did not exist.

Reset Method (RNIFReceiver Component)

This property is used to reset all attributes of the Rnifreceiver instance.

Syntax

public void Reset();

Async Version
public async Task Reset();
public async Task Reset(CancellationToken cancellationToken);
Public Sub Reset()

Async Version
Public Sub Reset() As Task
Public Sub Reset(cancellationToken As CancellationToken) As Task

Remarks

Reset is used to reset all attributes of the Rnifreceiver instance including the headers, attachments, etc. to their default values. This may be useful when multiple messages need to be created.

NOTE: The application should always call Reset and set all message properties to valid value before sending a response message.

SendResponse Method (RNIFReceiver Component)

Optional. Acknowledges the incoming request.

Syntax

public void SendResponse();

Async Version
public async Task SendResponse();
public async Task SendResponse(CancellationToken cancellationToken);
Public Sub SendResponse()

Async Version
Public Sub SendResponse() As Task
Public Sub SendResponse(cancellationToken As CancellationToken) As Task

Remarks

This sends a signal to the client. The signal may be a receipt of acknowledgement or a notification of failure. SendResponse will send the response message synchronously over the original HTTP connection. If an asynchronous response is requested by the client or required by the PIP, you should use the RNIFSender.

NOTE: This method does not create the RosettaNet acknowledgement receipt or notification of failure, it simply sends it. You must create the response message and set it via the ServiceContent, along with setting the headers to valid values, before you calling this method.

SetAttachmentOutputStream Method (RNIFReceiver Component)

Decodes the specified attachment to the output stream.

Syntax

public void SetAttachmentOutputStream(int index, System.IO.Stream stream);

Async Version
public async Task SetAttachmentOutputStream(int index, System.IO.Stream stream);
public async Task SetAttachmentOutputStream(int index, System.IO.Stream stream, CancellationToken cancellationToken);
Public Sub SetAttachmentOutputStream(ByVal index As Integer, ByVal stream As System.IO.Stream)

Async Version
Public Sub SetAttachmentOutputStream(ByVal index As Integer, ByVal stream As System.IO.Stream) As Task
Public Sub SetAttachmentOutputStream(ByVal index As Integer, ByVal stream As System.IO.Stream, cancellationToken As CancellationToken) As Task

Remarks

This method decodes the attachment specified by index to the specified stream. When this method is called the attachment is decoded immediately and the decoded data is written to the specified stream.

SetRequestStream Method (RNIFReceiver Component)

Sets the stream from which the component will read the RNIF request.

Syntax

public void SetRequestStream(System.IO.Stream inputStream);

Async Version
public async Task SetRequestStream(System.IO.Stream inputStream);
public async Task SetRequestStream(System.IO.Stream inputStream, CancellationToken cancellationToken);
Public Sub SetRequestStream(ByVal InputStream As System.IO.Stream)

Async Version
Public Sub SetRequestStream(ByVal InputStream As System.IO.Stream) As Task
Public Sub SetRequestStream(ByVal InputStream As System.IO.Stream, cancellationToken As CancellationToken) As Task

Remarks

If an input stream is set before the component attempts to process an RNIF request, the data is read from the input stream. Otherwise the Request will be checked. If neither of these properties are populated, the component will assume that it is hosted in an IIS application and will attempt to find the current HTTP context.

The content of the stream will be read from the current position all the way to the end and no bytes will be skipped.

Error Event (RNIFReceiver Component)

Fired when information is available about errors during data delivery.

Syntax

public event OnErrorHandler OnError;

public delegate void OnErrorHandler(object sender, RnifreceiverErrorEventArgs e);

public class RnifreceiverErrorEventArgs : EventArgs {
  public int ErrorCode { get; }
  public string Description { get; }
}
Public Event OnError As OnErrorHandler

Public Delegate Sub OnErrorHandler(sender As Object, e As RnifreceiverErrorEventArgs)

Public Class RnifreceiverErrorEventArgs Inherits EventArgs
  Public ReadOnly Property ErrorCode As Integer
  Public ReadOnly Property Description As String
End Class

Remarks

The Error event is fired in case of exceptional conditions during message processing. Normally the component throws an exception.

The ErrorCode parameter contains an error code, and the Description parameter contains a textual description of the error. For a list of valid error codes and their descriptions, please refer to the Error Codes section.

Certificate Type

This is the digital certificate being used.

Remarks

This type describes the current digital certificate. The certificate may be a public or private key. The fields are used to identify or select certificates.

Fields

EffectiveDate
string (read-only)

Default Value: ""

This is the date on which this certificate becomes valid. Before this date, it is not valid. The following example illustrates the format of an encoded date:

23-Jan-2000 15:00:00.

Encoded
string

Default Value: ""

This is the certificate (PEM/Base64 encoded). This field is used to assign a specific certificate. The Store and Subject fields also may be used to specify a certificate.

When Encoded is set, a search is initiated in the current Store for the private key of the certificate. If the key is found, Subject is updated to reflect the full subject of the selected certificate; otherwise, Subject is set to an empty string.

EncodedB
byte []

Default Value: ""

This is the certificate (PEM/Base64 encoded). This field is used to assign a specific certificate. The Store and Subject fields also may be used to specify a certificate.

When Encoded is set, a search is initiated in the current Store for the private key of the certificate. If the key is found, Subject is updated to reflect the full subject of the selected certificate; otherwise, Subject is set to an empty string.

ExpirationDate
string (read-only)

Default Value: ""

This is the date the certificate expires. After this date, the certificate will no longer be valid. The following example illustrates the format of an encoded date:

23-Jan-2001 15:00:00.

ExtendedKeyUsage
string

Default Value: ""

This is a comma-delimited list of extended key usage identifiers. These are the same as ASN.1 object identifiers (OIDs).

Fingerprint
string (read-only)

Default Value: ""

This is the hex-encoded, 16-byte MD5 fingerprint of the certificate. This property is primarily used for keys which do not have a corresponding X.509 public certificate, such as PEM keys that only contain a private key. It is commonly used for SSH keys.

The following example illustrates the format: bc:2a:72:af:fe:58:17:43:7a:5f:ba:5a:7c:90:f7:02

FingerprintSHA1
string (read-only)

Default Value: ""

This is the hex-encoded, 20-byte SHA-1 fingerprint of the certificate. This property is primarily used for keys which do not have a corresponding X.509 public certificate, such as PEM keys that only contain a private key. It is commonly used for SSH keys.

The following example illustrates the format: 30:7b:fa:38:65:83:ff:da:b4:4e:07:3f:17:b8:a4:ed:80:be:ff:84

FingerprintSHA256
string (read-only)

Default Value: ""

This is the hex-encoded, 32-byte SHA-256 fingerprint of the certificate. This property is primarily used for keys which do not have a corresponding X.509 public certificate, such as PEM keys that only contain a private key. It is commonly used for SSH keys.

The following example illustrates the format: 6a:80:5c:33:a9:43:ea:b0:96:12:8a:64:96:30:ef:4a:8a:96:86:ce:f4:c7:be:10:24:8e:2b:60:9e:f3:59:53

Issuer
string (read-only)

Default Value: ""

This is the issuer of the certificate. This field contains a string representation of the name of the issuing authority for the certificate.

PrivateKey
string (read-only)

Default Value: ""

This is the private key of the certificate (if available). The key is provided as PEM/Base64-encoded data.

Note: The PrivateKey may be available but not exportable. In this case, PrivateKey returns an empty string.

PrivateKeyAvailable
bool (read-only)

Default Value: False

This field shows whether a PrivateKey is available for the selected certificate. If PrivateKeyAvailable is True, the certificate may be used for authentication purposes (e.g., server authentication).

PrivateKeyContainer
string (read-only)

Default Value: ""

This is the name of the PrivateKey container for the certificate (if available). This functionality is available only on Windows platforms.

PublicKey
string (read-only)

Default Value: ""

This is the public key of the certificate. The key is provided as PEM/Base64-encoded data.

PublicKeyAlgorithm
string

Default Value: ""

This field contains the textual description of the certificate's public key algorithm. The property contains either the name of the algorithm (e.g., "RSA" or "RSA_DH") or an object identifier (OID) string representing the algorithm.

PublicKeyLength
int (read-only)

Default Value: 0

This is the length of the certificate's public key (in bits). Common values are 512, 1024, and 2048.

SerialNumber
string (read-only)

Default Value: ""

This is the serial number of the certificate encoded as a string. The number is encoded as a series of hexadecimal digits, with each pair representing a byte of the serial number.

SignatureAlgorithm
string (read-only)

Default Value: ""

The field contains the text description of the certificate's signature algorithm. The property contains either the name of the algorithm (e.g., "RSA" or "RSA_MD5RSA") or an object identifier (OID) string representing the algorithm.

Store
string

Default Value: "MY"

This is the name of the certificate store for the client certificate.

The StoreType field denotes the type of the certificate store specified by Store. If the store is password protected, specify the password in StorePassword.

Store is used in conjunction with the Subject field to specify client certificates. If Store has a value, and Subject or Encoded is set, a search for a certificate is initiated. Please see the Subject field for details.

Designations of certificate stores are platform dependent.

The following designations are the most common User and Machine certificate stores in Windows:

MYA certificate store holding personal certificates with their associated private keys.
CACertifying authority certificates.
ROOTRoot certificates.

When the certificate store type is PFXFile, this property must be set to the name of the file. When the type is PFXBlob, the property must be set to the binary contents of a PFX file (i.e., PKCS#12 certificate store).

StoreB
byte []

Default Value: "MY"

This is the name of the certificate store for the client certificate.

The StoreType field denotes the type of the certificate store specified by Store. If the store is password protected, specify the password in StorePassword.

Store is used in conjunction with the Subject field to specify client certificates. If Store has a value, and Subject or Encoded is set, a search for a certificate is initiated. Please see the Subject field for details.

Designations of certificate stores are platform dependent.

The following designations are the most common User and Machine certificate stores in Windows:

MYA certificate store holding personal certificates with their associated private keys.
CACertifying authority certificates.
ROOTRoot certificates.

When the certificate store type is PFXFile, this property must be set to the name of the file. When the type is PFXBlob, the property must be set to the binary contents of a PFX file (i.e., PKCS#12 certificate store).

StorePassword
string

Default Value: ""

If the type of certificate store requires a password, this property is used to specify the password needed to open the certificate store.

StoreType
CertStoreTypes

Default Value: 0

This is the type of certificate store for this certificate.

The component supports both public and private keys in a variety of formats. When the cstAuto value is used, the component will automatically determine the type. This field can take one of the following values:

0 (cstUser - default)For Windows, this specifies that the certificate store is a certificate store owned by the current user.

Note: This store type is not available in Java.

1 (cstMachine)For Windows, this specifies that the certificate store is a machine store.

Note: This store type is not available in Java.

2 (cstPFXFile)The certificate store is the name of a PFX (PKCS#12) file containing certificates.
3 (cstPFXBlob)The certificate store is a string (binary or Base64-encoded) representing a certificate store in PFX (PKCS#12) format.
4 (cstJKSFile)The certificate store is the name of a Java Key Store (JKS) file containing certificates.

Note: This store type is only available in Java.

5 (cstJKSBlob)The certificate store is a string (binary or Base64-encoded) representing a certificate store in Java Key Store (JKS) format.

Note: this store type is only available in Java.

6 (cstPEMKeyFile)The certificate store is the name of a PEM-encoded file that contains a private key and an optional certificate.
7 (cstPEMKeyBlob)The certificate store is a string (binary or Base64-encoded) that contains a private key and an optional certificate.
8 (cstPublicKeyFile)The certificate store is the name of a file that contains a PEM- or DER-encoded public key certificate.
9 (cstPublicKeyBlob)The certificate store is a string (binary or Base64-encoded) that contains a PEM- or DER-encoded public key certificate.
10 (cstSSHPublicKeyBlob)The certificate store is a string (binary or Base64-encoded) that contains an SSH-style public key.
11 (cstP7BFile)The certificate store is the name of a PKCS#7 file containing certificates.
12 (cstP7BBlob)The certificate store is a string (binary) representing a certificate store in PKCS#7 format.
13 (cstSSHPublicKeyFile)The certificate store is the name of a file that contains an SSH-style public key.
14 (cstPPKFile)The certificate store is the name of a file that contains a PPK (PuTTY Private Key).
15 (cstPPKBlob)The certificate store is a string (binary) that contains a PPK (PuTTY Private Key).
16 (cstXMLFile)The certificate store is the name of a file that contains a certificate in XML format.
17 (cstXMLBlob)The certificate store is a string that contains a certificate in XML format.
18 (cstJWKFile)The certificate store is the name of a file that contains a JWK (JSON Web Key).
19 (cstJWKBlob)The certificate store is a string that contains a JWK (JSON Web Key).
21 (cstBCFKSFile)The certificate store is the name of a file that contains a BCFKS (Bouncy Castle FIPS Key Store).

Note: This store type is only available in Java and .NET.

22 (cstBCFKSBlob)The certificate store is a string (binary or Base64-encoded) representing a certificate store in BCFKS (Bouncy Castle FIPS Key Store) format.

Note: This store type is only available in Java and .NET.

23 (cstPKCS11)The certificate is present on a physical security key accessible via a PKCS#11 interface.

To use a security key, the necessary data must first be collected using the CertMgr component. The ListStoreCertificates method may be called after setting CertStoreType to cstPKCS11, CertStorePassword to the PIN, and CertStore to the full path of the PKCS#11 DLL. The certificate information returned in the CertList event's CertEncoded parameter may be saved for later use.

When using a certificate, pass the previously saved security key information as the Store and set StorePassword to the PIN.

Code Example. SSH Authentication with Security Key: certmgr.CertStoreType = CertStoreTypes.cstPKCS11; certmgr.OnCertList += (s, e) => { secKeyBlob = e.CertEncoded; }; certmgr.CertStore = @"C:\Program Files\OpenSC Project\OpenSC\pkcs11\opensc-pkcs11.dll"; certmgr.CertStorePassword = "123456"; //PIN certmgr.ListStoreCertificates(); sftp.SSHCert = new Certificate(CertStoreTypes.cstPKCS11, secKeyBlob, "123456", "*"); sftp.SSHUser = "test"; sftp.SSHLogon("myhost", 22);

99 (cstAuto)The store type is automatically detected from the input data. This setting may be used with both public and private keys and can detect any of the supported formats automatically.

Subject
string

Default Value: ""

This is the subject of the certificate used for client authentication.

This field will be populated with the full subject of the loaded certificate. When loading a certificate the subject is used to locate the certificate in the store.

If an exact match is not found, the store is searched for subjects containing the value of the property.

If a match is still not found, the property is set to an empty string, and no certificate is selected.

The special value "*" picks a random certificate in the certificate store.

The certificate subject is a comma-separated list of distinguished name fields and values. For instance, "CN=www.server.com, OU=test, C=US, E=support@nsoftware.com". Common fields and their meanings are as follows:

FieldMeaning
CNCommon Name. This is commonly a hostname like www.server.com.
OOrganization
OUOrganizational Unit
LLocality
SState
CCountry
EEmail Address

If a field value contains a comma, it must be quoted.

SubjectAltNames
string (read-only)

Default Value: ""

This field contains comma-separated lists of alternative subject names for the certificate.

ThumbprintMD5
string (read-only)

Default Value: ""

This field contains the MD5 hash of the certificate. It is primarily used for X.509 certificates. If the hash does not already exist, it is automatically computed.

ThumbprintSHA1
string (read-only)

Default Value: ""

This field contains the SHA-1 hash of the certificate. It is primarily used for X.509 certificates. If the hash does not already exist, it is automatically computed.

ThumbprintSHA256
string (read-only)

Default Value: ""

This field contains the SHA-256 hash of the certificate. It is primarily used for X.509 certificates. If the hash does not already exist, it is automatically computed.

Usage
string

Default Value: ""

This field contains the text description of UsageFlags.

This value will be of one or more of the following strings and will be separated by commas:

  • Digital Signatures
  • Key Authentication
  • Key Encryption
  • Data Encryption
  • Key Agreement
  • Certificate Signing
  • Key Signing

If the provider is OpenSSL, the value is a comma-separated list of X.509 certificate extension names.

UsageFlags
int

Default Value: 0

This field contains the flags that show intended use for the certificate. The value of UsageFlags is a combination of the following flags:

0x80Digital Signatures
0x40Key Authentication (Non-Repudiation)
0x20Key Encryption
0x10Data Encryption
0x08Key Agreement
0x04Certificate Signing
0x02Key Signing

Please see the Usage field for a text representation of UsageFlags.

This functionality currently is not available when the provider is OpenSSL.

Version
string (read-only)

Default Value: ""

This field contains the certificate's version number. The possible values are the strings "V1", "V2", and "V3".

Constructors

public Certificate();
Public Certificate()

Creates a Certificate instance whose properties can be set. This is useful for use with CERTMGR when generating new certificates.

public Certificate(string certificateFile);
Public Certificate(ByVal CertificateFile As String)

Opens CertificateFile and reads out the contents as an X.509 public key.

public Certificate(byte[] certificateData);
Public Certificate(ByVal CertificateData As Byte())

Parses CertificateData as an X.509 public key.

public Certificate(CertStoreTypes certStoreType, string store, string storePassword, string subject);
Public Certificate(ByVal CertStoreType As CertStoreTypes, ByVal Store As String, ByVal StorePassword As String, ByVal Subject As String)

CertStoreType identifies the type of certificate store to use. See StoreType for descriptions of the different certificate stores. Store is a file containing the certificate store. StorePassword is the password used to protect the store. After the store has been successfully opened, the component will attempt to find the certificate identified by Subject . This can be either a complete or a substring match of the X.509 certificate's subject Distinguished Name (DN).

public Certificate(CertStoreTypes certStoreType, string store, string storePassword, string subject, string configurationString);
Public Certificate(ByVal CertStoreType As CertStoreTypes, ByVal Store As String, ByVal StorePassword As String, ByVal Subject As String, ByVal ConfigurationString As String)

CertStoreType identifies the type of certificate store to use. See StoreType for descriptions of the different certificate stores. Store is a file containing the certificate store. StorePassword is the password used to protect the store. ConfigurationString is a newline separated list of name-value pairs that may be used to modify the default behavior. Possible values include "PersistPFXKey", which shows whether or not the PFX key is persisted after performing operations with the private key. This correlates to the PKCS12_NO_PERSIST_KEY CryptoAPI option. The default value is True (the key is persisted). "Thumbprint" - an MD5, SHA-1, or SHA-256 thumbprint of the certificate to load. When specified, this value is used to select the certificate in the store. This is applicable to cstUser, cstMachine, cstPublicKeyFile, and cstPFXFile store types. "UseInternalSecurityAPI" shows whether the platform (default) or the internal security API is used when performing certificate-related operations. After the store has been successfully opened, the component will attempt to find the certificate identified by Subject . This can be either a complete or a substring match of the X.509 certificate's subject Distinguished Name (DN).

public Certificate(CertStoreTypes certStoreType, string store, string storePassword, byte[] encoded);
Public Certificate(ByVal CertStoreType As CertStoreTypes, ByVal Store As String, ByVal StorePassword As String, ByVal Encoded As Byte())

CertStoreType identifies the type of certificate store to use. See StoreType for descriptions of the different certificate stores. Store is a file containing the certificate store. StorePassword is the password used to protect the store. After the store has been successfully opened, the component will load Encoded as an X.509 certificate and search the opened store for a corresponding private key.

public Certificate(CertStoreTypes certStoreType, byte[] storeBlob, string storePassword, string subject);
Public Certificate(ByVal CertStoreType As CertStoreTypes, ByVal StoreBlob As Byte(), ByVal StorePassword As String, ByVal Subject As String)

CertStoreType identifies the type of certificate store to use. See StoreType for descriptions of the different certificate stores. StoreBlob is a string (binary- or Base64-encoded) containing the certificate data. StorePassword is the password used to protect the store. After the store has been successfully opened, the component will attempt to find the certificate identified by Subject . This can be either a complete or a substring match of the X.509 certificate's subject Distinguished Name (DN).

public Certificate(CertStoreTypes certStoreType, byte[] storeBlob, string storePassword, string subject, string configurationString);
Public Certificate(ByVal CertStoreType As CertStoreTypes, ByVal StoreBlob As Byte(), ByVal StorePassword As String, ByVal Subject As String, ByVal ConfigurationString As String)

CertStoreType identifies the type of certificate store to use. See StoreType for descriptions of the different certificate stores. StoreBlob is a string (binary- or Base64-encoded) containing the certificate data. StorePassword is the password used to protect the store. After the store has been successfully opened, the component will attempt to find the certificate identified by Subject . This can be either a complete or a substring match of the X.509 certificate's subject Distinguished Name (DN).

public Certificate(CertStoreTypes certStoreType, byte[] storeBlob, string storePassword, byte[] encoded);
Public Certificate(ByVal CertStoreType As CertStoreTypes, ByVal StoreBlob As Byte(), ByVal StorePassword As String, ByVal Encoded As Byte())

CertStoreType identifies the type of certificate store to use. See StoreType for descriptions of the different certificate stores. Store is a string (binary- or Base64-encoded) containing the certificate store. StorePassword is the password used to protect the store. After the store has been successfully opened, the component will load Encoded as an X.509 certificate and search the opened store for a corresponding private key.

Header Type

This is an HTTP header as it is received from the server.

Remarks

When a header is received through a Header event, it is parsed into a Header type. This type contains a Field, and its corresponding Value.

Fields

Field
string

Default Value: ""

This field contains the name of the HTTP Header (this is the same case as it is delivered).

Value
string

Default Value: ""

This field contains the Header contents.

Constructors

public Header();
Public Header()
public Header(string field, string value);
Public Header(ByVal Field As String, ByVal Value As String)

QOSSpecification Type

A name-value pair defining a quality of service.

Remarks

Version 2.0 of the RosettaNet Implementation Framework introduced a set of Quality of Service (QOS) elements to ensure future backward compatibility.

Fields

Code
string

Default Value: ""

Code is a string representing a quality of service measurement category.

Value
string

Default Value: ""

Value is a string that defines the constraints for the category in Code.

Constructors

public QOSSpecification();
Public QOSSpecification()
public QOSSpecification(string code, string value);
Public QOSSpecification(ByVal Code As String, ByVal Value As String)

RNIFAttachment Type

This describes the file being attached.

Remarks

Information about the file's location that is being attached to the message is contained here.

Fields

Data
string

Default Value: ""

Data contains the raw data of the current attachment. If Data is set, the value in FileName will be used to specify the name of the attachment when generating messages to be sent. When receiving, polling This field will cause the attachment to be parsed out of the transmitted MIME entity to memory rather than being parsed to a file.

DataB
byte []

Default Value: ""

Data contains the raw data of the current attachment. If Data is set, the value in FileName will be used to specify the name of the attachment when generating messages to be sent. When receiving, polling This field will cause the attachment to be parsed out of the transmitted MIME entity to memory rather than being parsed to a file.

Description
string

Default Value: ""

Description contains descriptions for this attachment. These descriptions are human-readable strings and may set to any arbitrary value. These descriptions should play no role in how the message is processed or interpreted.

Filename
string

Default Value: ""

Filename is the name of the file containing the decoded data of the current attachment. When sending messages, this value tells the component where to find the file and is used in accordance with MIME encoding rules to indicate the filename to be used by the receiving RNIF entity when parsing the attachments.

When receiving, polling This field will cause the attachment to be parsed out of the transmitted MIME entity to the filename indicated by the MIME encoding rules. When the property returns, the file will be written to the path indicated.

Id
string

Default Value: ""

Id is a unique content-identifier used within the RosettaNet message to internally reference the attachments. Because these identifiers are used to reference the attachments, each attachment must have a unique identifier, but they only need to be unique within the scope of the current message. These values may take the form of a URI.

InputStream
System.IO.Stream

Default Value: ""

A stream which contains the decoded data of the current attachment.

MIMEType
string

Default Value: ""

MimeType is a value indicating how the RNIFAttachment should be interpreted. Valid MIME types include, but are not limited to, the following:

  • "plain/html"
  • "plain/text"
  • "image/jpg"
  • "image/gif"
  • "image/bmp"
  • "application/stream"

OutputStream
System.IO.Stream

Default Value: ""

The component decodes the attachment when OutputStream is specified.

Note: It is recommended to use the SetAttachmentOutputStream method instead of setting this field.

Constructors

public RNIFAttachment();
Public RNIFAttachment()
public RNIFAttachment(string filename);
Public RNIFAttachment(ByVal Filename As String)
public RNIFAttachment(string filename, string id);
Public RNIFAttachment(ByVal Filename As String, ByVal Id As String)
public RNIFAttachment(string filename, string id, string description);
Public RNIFAttachment(ByVal Filename As String, ByVal Id As String, ByVal Description As String)
public RNIFAttachment(string filename, string id, string description, string MIMEType);
Public RNIFAttachment(ByVal Filename As String, ByVal Id As String, ByVal Description As String, ByVal MIMEType As String)

Config Settings (RNIFReceiver Component)

The component accepts one or more of the following configuration settings. Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the component, access to these internal properties is provided through the Config method.

RNIFReceiver Config Settings

AttachmentOutputPath:   Specifies a path on disk to which attachments will be saved.

This setting specifies a path on disk to which attachments will be saved when processing incoming messages.

ExpectedVersion:   The RNIF document version that the RNIFReceiver is expecting to receive.

This configuration option allow you to explicitly define the RNIF version of the document that you are expecting to receive. If this value is set, the component will not attempt to parse the RNIF version from the received headers and will attempt to process the received document as an RNIF document of the version specified in this configuration option.

OptionEffect
0 (default)No expected version. Parses the RNIF version from received headers and process document based on this.
1Expect RNIF v1.1 document.
2Expect RNIF v2.0 document.
FromPartnerClassificationCode:   Code identifying the sending partner's function in the supply chain.

GlobalProcessCode:   Business process identifier e.g. 'Manage Product Subscriptions'. This code is the name of a PIP specification document.

HTTPStatusCode:   The HTTP status code to send in the response.

If set, this defines the HTTP status code returned by the component when SendResponse is called. By default the component will return a HTTP status code of 200.

MessageDigest:   The base-64 encoded hash of the received data.

This configuration setting will return the base-64 encoded hash of the received data.

RequireEncryption:   Whether encryption is required when processing received messages.

This setting may be set to True to require that received messages are encrypted. When True if a message is received that is not encrypted the component will throw an exception. The default value is False.

RequireSignature:   Whether a signature is required when processing received messages.

This setting may be set to True to require that received messages are signed. When True if a message is received that is not signed the component will throw an exception. The default value is False.

SignatureAlgorithm:   Signature algorithm to be used in outgoing messages.

Signature Algorithm can be set to md5 or sha1, to indicate the preferred signing algorithm.

ToPartnerClassificationCode:   Code identifying the receiving partner's function in the supply chain.

TransactionCode:   Service transaction dialog. The code is the name of the business activity and the transaction dialog in the PIP specification document.

TransactionId:   A 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.

TransferredData:   The full body of the incoming request.

After calling ParseRequest this will contain the full body of the incoming request.

TransferredHeaders:   The HTTP headers of the incoming request.

After calling ParseRequest this will contain the full HTTP headers of the incoming request.

Base Config Settings

BuildInfo:   Information about the product's build.

When queried, this setting will return a string containing information about the product's build.

GUIAvailable:   Whether or not a message loop is available for processing events.

In a GUI-based application, long-running blocking operations may cause the application to stop responding to input until the operation returns. The component will attempt to discover whether or not the application has a message loop and, if one is discovered, it will process events in that message loop during any such blocking operation.

In some non-GUI applications, an invalid message loop may be discovered that will result in errant behavior. In these cases, setting GUIAvailable to false will ensure that the component does not attempt to process external events.

LicenseInfo:   Information about the current license.

When queried, this setting will return a string containing information about the license this instance of a component is using. It will return the following information:

  • Product: The product the license is for.
  • Product Key: The key the license was generated from.
  • License Source: Where the license was found (e.g., RuntimeLicense, License File).
  • License Type: The type of license installed (e.g., Royalty Free, Single Server).
  • Last Valid Build: The last valid build number for which the license will work.
MaskSensitive:   Whether sensitive data is masked in log messages.

In certain circumstances it may be beneficial to mask sensitive data, like passwords, in log messages. Set this to true to mask sensitive data. The default is true.

This setting only works on these components: AS3Receiver, AS3Sender, Atom, Client(3DS), FTP, FTPServer, IMAP, OFTPClient, SSHClient, SCP, Server(3DS), Sexec, SFTP, SFTPServer, SSHServer, TCPClient, TCPServer.

UseFIPSCompliantAPI:   Tells the component whether or not to use FIPS certified APIs.

When set to true, the component will utilize the underlying operating system's certified APIs. Java editions, regardless of OS, utilize Bouncy Castle FIPS, while all the other Windows editions make use of Microsoft security libraries.

FIPS mode can be enabled by setting the UseFIPSCompliantAPI configuration setting to true. This is a static setting which applies to all instances of all components of the toolkit within the process. It is recommended to enable or disable this setting once before the component has been used to establish a connection. Enabling FIPS while an instance of the component is active and connected may result in unexpected behavior.

For more details please see the FIPS 140-2 Compliance article.

Note: This setting is only applicable on Windows.

Note: Enabling FIPS-compliance requires a special license; please contact sales@nsoftware.com for details.

UseInternalSecurityAPI:   Whether or not to use the system security libraries or an internal implementation.

When set to false, the component will use the system security libraries by default to perform cryptographic functions where applicable. In this case, calls to unmanaged code will be made. In certain environments, this is not desirable. To use a completely managed security implementation, set this setting to true.

Setting this configuration setting to true tells the component to use the internal implementation instead of using the system security libraries.

On Windows, this setting is set to false by default. On Linux/macOS, this setting is set to true by default.

If using the .NET Standard Library, this setting will be true on all platforms. The .NET Standard library does not support using the system security libraries.

Note: This setting is static. The value set is applicable to all components used in the application.

When this value is set, the product's system dynamic link library (DLL) is no longer required as a reference, as all unmanaged code is stored in that file.

Trappable Errors (RNIFReceiver Component)

SMIME Errors

10191   Invalid index (RecipientIndex).
10192   Message decoding error (code).
10193   Unexpected message type.
10194   Unsupported hashing/signing algorithm.
10195   The message does not have any signers.
10196   The message signature could not be verified.
10197   Could not locate a suitable decryption certificate.
10198   The signer certificate could not be found.
10199   No signing certificate was supplied for signing the message.
10201   The specified certificate was not the one required.
10202   The specified certificate could not be found.
10221   Could not acquire CSP.
10222   Type validation error.
10223   Unsupported key size.
10224   Unrecognized Content-Type object identifier.
10225   Unrecognized public key format.
10226   No choices specified.
10228   Must specify output stream.
10280   Invalid part index.
10281   Unknown MIME type.
10283   No MIME-boundary found.
10280   Error decoding certificate.

XML Errors

101   Invalid attribute index.
102   No attributes available.
103   Invalid namespace index.
104   No namespaces available.
105   Invalid element index.
106   No elements available.
107   Attribute does not exist.
201   Unbalanced element tag.
202   Unknown element prefix (can't find namespace).
203   Unknown attribute prefix (can't find namespace).
204   Invalid XML markup.
205   Invalid end state for parser.
206   Document contains unbalanced elements.
207   Invalid XPath.
208   No such child.
209   Top element does not match start of path.
210   DOM tree unavailable (set BuildDOM to true and reparse).
302   Can't open file.
401   Invalid XML would be generated.
402   An invalid XML name has been specified.