GISBReceiver Component
Properties Methods Events Config Settings Errors
The GISBReceiver class is used to process EDI messages and generate receipts.
Syntax
ipworksedi.GISBReceiver
Remarks
The GISBReceiver implements server-side processing of EDI messages, as specified in versions 1.4 and 1.6 of the GISB/NAESB specification. It can be used to decrypt and verify incoming messages; in version 1.6, it may additionally be used to generate signed receipts. The component is designed to be easily incorporated into an HTTP server, and features custom functionality for server environments such as ASP.NET.
Basic Operation
The ProcessRequest method is used to process incoming messages and generate responses. ProcessRequest will parse the form data, determine DataFrom and DataTo, and then attempt to process any signed or encrypted data using PGP.
The following table defines possible values that may be passed to the SetPGPParam.
| homedir | The directory containing the public keyring, secret keyring and trust database. Please note this defaults to the application preferences directory of the user, hence if the GNUPG provider is being used from a ASP.NET application, homedir should be specified. |
| passphrase | The passphrase to access the secret keys in the secret-keyring. |
| userid | The identifier used to identify a secret key within the secret-keyring. Note: When decrypting if this value is not specified the component will attempt to find the key within the keyring automatically based on information available in the PGP message itself. |
| recipient-userid | The identifier used to identify a public key within the public keyring. Note: When verifying a signature if this value is not specified the component will attempt to find the key within the keyring automatically based on information available in the PGP message itself. |
| timeout | The timeout in milliseconds that the provider will wait for a response from the OpenPGP executable. The default is 5000 (5 seconds). |
| usetempfile | If set to "true" the provider will write data to be processed to a temporary file on disk. This is useful when working with large files or binary files. |
| signingalgorithm | The signing algorithm to use when SignData is True. Possible values are:
|
| encryptingalgorithm | The encrypting algorithm to use when EncryptData is True. Possible values are:
|
| compressionmethod | The compression method to use. Possible values are:
|
Finally, the component will generate a Response which you may send to the client with SendResponse.
The most important part of the Response is the RequestStatus; this property will contain either "ok" or an error message to be returned to the requesting client. By default the component will accept any post that conforms to the standard. If you want to be more restrictive you should first invoke ParseRequest to determine the sender, check the message security used, and extract the EDI data. If there is a problem you may then set RequestStatus to an error before calling CreateResponse. Please see the RequestStatus property for a list of standard error messages.
If you use version 1.4 of the GISB/NAESB protocol, the response will be a simple HTML reply. If you use version 1.6 the sender has the option of requesting a signed receipt. In all cases the response may be created with CreateResponse and sent with SendResponse.
To create log files, set LogDirectory prior to invoking ProcessRequest. This will log all incoming and outgoing data, and will also write the received EDI files to disk.
Additional Server-Side Functionality
When used in a server environment such as ASP, ASP.NET, etc., the component may be used to interface directly with the underlying HTTP context. If Request is not set by the user ParseRequest and ProcessRequest will first get the request from the underlying HTTP environment, if possible. SendResponse will send the reply in this environment if able; otherwise the reply will be directed to standard out.
Property List
The following is the full list of the properties of the component with short descriptions. Click on the links for further details.
| DataElementCount | The number of records in the DataElement arrays. |
| DataElementName | The name of the current data element. |
| DataElementValue | The value of the current data element. |
| DataFrom | The identity of the sending system. |
| DataTo | The identity of the receiving system. |
| ErrorMessage | If the client sent an error notification, the error message. |
| EDIData | This property contains the EDI payload of the transmission. |
| EDIType | The EDIType of the EDI message. |
| EDIFileName | In a sender, if FileName is specified, the file specified will be used for the EDI payload of the transmission. |
| EDIName | Name is the final name to be associated with the contents of either the Data or FileName properties. |
| GISBVersion | The version of the GISB/NAESB protocol used. |
| LogDirectory | The path to a directory for logging. |
| LogFile | The log file written. |
| PublicKeyringData | Public keyring data. |
| ReceiptSigningProtocol | The protocol used to sign the receipt, if any. |
| ReceiptType | The type of receipt to be returned, if any. |
| Request | The HTTP request to be processed. |
| RequestHeaders | The HTTP headers in the request. |
| RequestStatus | The status of the request. |
| Response | The response generated by the class. |
| ResponseHeaders | The response headers generated by the class. |
| SecretKeyringData | Secret keyring data. |
| ServerId | The ID of your server. |
| TransactionId | The transaction ID of the message. |
Method List
The following is the full list of the methods of the component with short descriptions. Click on the links for further details.
| Config | Sets or retrieves a configuration setting. |
| CreateResponse | Creates the response. |
| ParseFormData | Processes the form data, and populates the appropriate properties. |
| ParseRequest | Processes the EDI data. |
| ProcessRequest | Processes the EDI data, and generates the receipt. |
| ReadRequest | Reads the AS2 request from the given HTTP servlet request. |
| Reset | Resets the state of the control. |
| SendResponse | In a server environment, responds to the requesting client. |
| SetPGPParam | Sets a parameter in the PGP provider. |
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.
| Error | Fired when information is available about errors during data delivery. |
| Log | Fired with log information while processing a message. |
Config Settings
The following is a list of config settings for the component with short descriptions. Click on the links for further details.
| LogFilename | The base name of the log file. |
| LogLevel | Specifies the level of detail that is logged. |
| RequireEncryption | Whether an error should be thrown if an unencrypted message is received. |
| RequireSignature | Whether an error should be thrown if an unsigned message is received. |
| TimeCFormat | The format of the Time-C data element. |
| TimeCQualifier | The UTC off-set of the server. |
| BuildInfo | Information about the product's build. |
| CodePage | The system code page used for Unicode to Multibyte translations. |
| LicenseInfo | Information about the current license. |
| MaskSensitiveData | Whether sensitive data is masked in log messages. |
| UseInternalSecurityAPI | Whether or not to use the system security libraries or an internal implementation. |
DataElementCount Property (GISBReceiver Component)
The number of records in the DataElement arrays.
Syntax
func (obj *GISBReceiver) DataElementCount() (int32, error)
func (obj *GISBReceiver) SetDataElementCount(value int32) error
Default Value
0
Remarks
This property controls the size of the following arrays:
The array indices start at 0 and end at DataElementCount - 1.Data Type
int32
DataElementName Property (GISBReceiver Component)
The name of the current data element.
Syntax
func (obj *GISBReceiver) DataElementName(ElementIndex int32) (string, error)
func (obj *GISBReceiver) SetDataElementName(ElementIndex int32, value string) error
Default Value
""
Remarks
The name of the current data element.
The ElementIndex parameter specifies the index of the item in the array. The size of the array is controlled by the DataElementCount property.
Data Type
string
DataElementValue Property (GISBReceiver Component)
The value of the current data element.
Syntax
func (obj *GISBReceiver) DataElementValue(ElementIndex int32) (string, error)
func (obj *GISBReceiver) SetDataElementValue(ElementIndex int32, value string) error
Default Value
""
Remarks
The value of the current data element.
The ElementIndex parameter specifies the index of the item in the array. The size of the array is controlled by the DataElementCount property.
Data Type
string
DataFrom Property (GISBReceiver Component)
The identity of the sending system.
Syntax
func (obj *GISBReceiver) DataFrom() (string, error)
Default Value
""
Remarks
Will generally be the DUNS number of the sending trading partner.
This property is read-only.
Data Type
string
DataTo Property (GISBReceiver Component)
The identity of the receiving system.
Syntax
func (obj *GISBReceiver) DataTo() (string, error)
Default Value
""
Remarks
Will generally be the DUNS number of the receiving trading partner.
This property is read-only.
Data Type
string
ErrorMessage Property (GISBReceiver Component)
If the client sent an error notification, the error message.
Syntax
func (obj *GISBReceiver) ErrorMessage() (string, error)
Default Value
""
Remarks
ErrorMessage will be set in case the Request is an error notification rather than a post. The ErrorMessage will contain the entire contents of the error notification.
For example, the following might be returned:
orig-from=123456789* orig-to=234567890* orig-input-format=X12* resp-time-c=11960619102855* resp-server-id=coolhost* resp-trans-id=234423897* request-status=EEDM601: Public Key Invalid* comments=Please contact 1-800-555-1212 for correct public key*
This property is read-only.
Data Type
string
EDIData Property (GISBReceiver Component)
This property contains the EDI payload of the transmission.
Syntax
func (obj *GISBReceiver) EDIData() ([]byte, error)
Default Value
""
Remarks
This property contains the EDI payload of the transmission.
In a receiver, this property will only be populated if EDIOutputStream has not been specified and ParseRequest finishes without an error. EDIData will contain the full decrypted text of the EDI message.
This property is read-only.
Data Type
[]byte
EDIType Property (GISBReceiver Component)
The EDIType of the EDI message.
Syntax
func (obj *GISBReceiver) EDIType() (string, error)
Default Value
"X12"
Remarks
The EDIType of the EDI message. The default value is "X12". EDIType may also be set to "error", in which case the message is an error relating to a previous message. In this case the ErrorMessage property and related properties will provide more information.
This property is read-only.
Data Type
string
EDIFileName Property (GISBReceiver Component)
In a sender, if FileName is specified, the file specified will be used for the EDI payload of the transmission.
Syntax
func (obj *GISBReceiver) EDIFileName() (string, error)
Default Value
""
Remarks
In a sender, if EDIFileName is specified, the file specified will be used for the EDI payload of the transmission. EDIName will be populated with the name of the file.
In a receiver, if this property is set prior to calling ParseFormData and ParseRequest the incoming data will be decrypted and written to the file at the specified path.
Note: When EDIOutputStream is set, the data will be written to the stream and this property will not be populated.
This property is read-only.
Data Type
string
EDIName Property (GISBReceiver Component)
Name is the final name to be associated with the contents of either the Data or FileName properties.
Syntax
func (obj *GISBReceiver) EDIName() (string, error)
Default Value
"rfc1767.edi"
Remarks
EDIName is the final name to be associated with the contents of either the EDIData or EDIFileName properties. This corresponds to the filename attribute of the Content-Disposition header for the EDI payload.
When constructing EDI data to be sent, EDIName will be set to the same value as EDIFileName, but can be overridden after setting EDIFileName to indicate that another name should be used in the outbound request's Content-Disposition MIME header.
When receiving EDI data, EDIName will be read out of the "filename" attribute of the inbound request's Content-Disposition MIME header.
This property is read-only.
Data Type
string
GISBVersion Property (GISBReceiver Component)
The version of the GISB/NAESB protocol used.
Syntax
func (obj *GISBReceiver) GISBVersion() (string, error)
Default Value
"1.4"
Remarks
The version of the GISB/NAESB protocol used. Note that when receiving documents the version will be determined automatically.
This property is read-only.
Data Type
string
LogDirectory Property (GISBReceiver Component)
The path to a directory for logging.
Syntax
func (obj *GISBReceiver) LogDirectory() (string, error)
func (obj *GISBReceiver) SetLogDirectory(value string) error
Default Value
""
Remarks
Setting LogDirectory will instruct the component to log the details of each transmission to unique files in the specified directory. For each request processed, the component will log the complete text of the incoming request, the EDI data (if it was able to be determined), and the outgoing response.
Two files will be written for each transmission. The diagnostic log will have the extension ".log" and will log the complete text of the incoming request, the EDI data (if it was able to be determined), and the outgoing response. The data file will have the extension ".dat" and will store the EDI data only. In case of error an additional file with extension ".err" file will be written, and the error information will also be written to the ".log" file.
The filenames will be chosen automatically by the component. Each filename will be the system time, in the format YYYY-MM-DD-HH-MM-SS-MMMM, with extensions "-2", "-3", used in case files of those names already exist. After each transaction is processed LogFile will contain the name of the files just written, minus the extension ".log" or ".dat".
If either log cannot be written an exception will be thrown; server applications should ensure that the server has the appropriate write permissions.
Data Type
string
LogFile Property (GISBReceiver Component)
The log file written.
Syntax
func (obj *GISBReceiver) LogFile() (string, error)
Default Value
""
Remarks
In case LogDirectory is specified two log files will be written in the specified directory and LogFile will contain the path. A diagnostic log will be written with filename LogFile + ".log" and the EDI data will be written with filename LogFile + ".dat". In case of error an additional file will be written with filename LogFile + ".err".
This property is read-only.
Data Type
string
PublicKeyringData Property (GISBReceiver Component)
Public keyring data.
Syntax
func (obj *GISBReceiver) PublicKeyringData() ([]byte, error)
func (obj *GISBReceiver) SetPublicKeyringData(value []byte) error
Default Value
""
Remarks
This property allows the public keyring data to be specific in the form of a byte array. Use this in conjunction with SecretKeyringData and the keyring will be loaded from this data instead of the homedir.
Data Type
[]byte
ReceiptSigningProtocol Property (GISBReceiver Component)
The protocol used to sign the receipt, if any.
Syntax
func (obj *GISBReceiver) ReceiptSigningProtocol() (string, error)
func (obj *GISBReceiver) SetReceiptSigningProtocol(value string) error
Default Value
""
Remarks
After you invoke ParseRequest this property will contain the signing protocol requested by the client (either an empty string or "pgp-signature"; other values are not supported). When you invoke CreateResponse this protocol will be used to sign the receipt.
Data Type
string
ReceiptType Property (GISBReceiver Component)
The type of receipt to be returned, if any.
Syntax
func (obj *GISBReceiver) ReceiptType() (string, error)
Default Value
""
Remarks
The type of receipt to be returned. If this property is empty a simple HTML response will be returned. For a value of "GISB-Acknowledgement-Receipt" a more detailed receipt will be generated.
Other values are not supported and will cause the component to throw an exception. You may, if you wish, catch this exception, generate your own Response, and send it using SendResponse.
This property is read-only.
Data Type
string
Request Property (GISBReceiver Component)
The HTTP request to be processed.
Syntax
func (obj *GISBReceiver) Request() ([]byte, error)
func (obj *GISBReceiver) SetRequest(value []byte) error
Default Value
""
Remarks
The body of the request to be processed. You may include the HTTP headers or specify them separately in RequestHeaders.
Typically the request may be read directly from the HTTP context, without setting this property.
Data Type
[]byte
RequestHeaders Property (GISBReceiver Component)
The HTTP headers in the request.
Syntax
func (obj *GISBReceiver) RequestHeaders() (string, error)
func (obj *GISBReceiver) SetRequestHeaders(value string) error
Default Value
""
Remarks
The entire list of HTTP and MIME headers.
Data Type
string
RequestStatus Property (GISBReceiver Component)
The status of the request.
Syntax
func (obj *GISBReceiver) RequestStatus() (string, error)
func (obj *GISBReceiver) SetRequestStatus(value string) error
Default Value
"ok"
Remarks
RequestStatus will be determined by ParseRequest or ProcessRequest, and will contain the string "ok" or an error message to be returned in the Response.
Errors relating to message processing (e.g., "EEDM104: Missing Data File") will automatically be discovered and reported by the component. Other types of errors are by mutual agreement. In particular the use of message security is not enforced by the component by default. To require encryption or signing set RequireEncryption or RequireSignature and specify error EEDM602 or EEDM604 as appropriate.
It is recommended that you set RequestStatus to one of the standard errors listed below. The specification additionally allows for a supplemental error message; separate this from the standard error with a semicolon. For example, "EEDM107: Invalid input format; expected X12."
The following is the complete list of error codes defined by the GISB 1.4 and NAESB 1.6 specification. Error codes only defined in version 1.6 are notated with "1.6" below, and errors that will be detected and reported automatically by the GISBReceiver component are indicated with an asterisk.
The following is the complete list of error codes defined by the GISB 1.4 specification.
EEDM100*: Missing From Common Code Identifier Code
EEDM101*: Missing To Common Code Identifier Code
EEDM102*: Missing Input Format
EEDM103*: Missing Data File
EEDM104: Missing Transaction Set
EEDM105: Invalid From Common Code Identifier
EEDM106: Invalid To Common Code Identifier
EEDM107: Invalid Input Format
EEDM108: Invalid Transaction Set
EEDM109: No Parameters Supplied
EEDM110: (1.6) Invalid "version"
EEDM111: (1.6) Missing "version"
EEDM112: (1.6) "receipt-security-selection" not mutually agreed
EEDM113*: (1.6) Invalid "receipt-security-selection"
EEDM114: (1.6) Missing "receipt-disposition-to"
EEDM115: (1.6) Invalid "receipt-disposition-to"
EEDM116: (1.6) Missing "receipt-report-type"
EEDM117: (1.6) Invalid "receipt-report-type"
EEDM118: (1.6) Missing "receipt-security-selection"
EEDM119: (1.6) Mutually agreed element, refnum, not present
EEDM601: Public Key Invalid
EEDM602: File Not Encrypted
EEDM603: Encrypted File Truncated
EEDM604*: Encrypted File Not Signed Or Signature Not Matched
EEDM699: Decryption Error
EEDM701: EDM Party Not Associated With EDI Party
EEDM702: Data Structure Error
EEDM703: Data Set Exchange Not Established For Trading Partner
EEDM999: System Error
WEDM100: Transaction Set Sent Not Mutually Agreed
WEDM102: (1.6) "receipt-security-selection" not mutually agreed
WEDM103: (1.6) Missing "receipt-security-selection"
WEDM104: (1.6) Element refnum received; not mutually agreed; ignored
Data Type
string
Response Property (GISBReceiver Component)
The response generated by the class.
Syntax
func (obj *GISBReceiver) Response() ([]byte, error)
Default Value
""
Remarks
The response generated by the component after invoking ProcessRequest or CreateResponse. The format of the response may range from a simple HTML response to a signed GISB-Acknowledgement-Receipt, depending on the client's request. In any case it will report success or failure as appropriate. If you wish to reject the request you may set RequestStatus to an appropriate value before invoking CreateResponse.
This property is read-only.
Data Type
[]byte
ResponseHeaders Property (GISBReceiver Component)
The response headers generated by the class.
Syntax
func (obj *GISBReceiver) ResponseHeaders() (string, error)
Default Value
""
Remarks
The response headers generated by the component after invoking ProcessRequest or CreateResponse. In general ResponseHeaders will consist of a single "Content-Type" header or an empty string.
This property is read-only.
Data Type
string
SecretKeyringData Property (GISBReceiver Component)
Secret keyring data.
Syntax
func (obj *GISBReceiver) SecretKeyringData() ([]byte, error)
func (obj *GISBReceiver) SetSecretKeyringData(value []byte) error
Default Value
""
Remarks
This property allows the secret keyring data to be specific in the form of a byte array. Use this in conjunction with PublicKeyringData and the keyring will be loaded from this data instead of the homedir.
Data Type
[]byte
ServerId Property (GISBReceiver Component)
The ID of your server.
Syntax
func (obj *GISBReceiver) ServerId() (string, error)
func (obj *GISBReceiver) SetServerId(value string) error
Default Value
""
Remarks
The ID of your server, as it will be described in the response. If you do not specify ServerId the component will attempt to determine it when you call ProcessRequest or CreateResponse.
Data Type
string
TransactionId Property (GISBReceiver Component)
The transaction ID of the message.
Syntax
func (obj *GISBReceiver) TransactionId() (string, error)
func (obj *GISBReceiver) SetTransactionId(value string) error
Default Value
""
Remarks
A unique ID for the transaction. In GISB a TransactionId will generated by the server whenever you process a request. You may either allow the component to generate unique values for TransactionId, or devise your own scheme and set TransactionId before invoking CreateResponse.
If you devise your own scheme you should set TransactionId after invoking ParseRequest as ParseRequest will generate a new ID for the request.
Data Type
string
Config Method (GISBReceiver Component)
Sets or retrieves a configuration setting.
Syntax
func (obj *GISBReceiver) Config(ConfigurationString string) (string, error)
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.
CreateResponse Method (GISBReceiver Component)
Creates the response.
Syntax
func (obj *GISBReceiver) CreateResponse() error
Remarks
Creates a response to the incoming request. The format of the request (signed receipt or simple HTML, for example) will depend on the request of the client.
ParseFormData Method (GISBReceiver Component)
Processes the form data, and populates the appropriate properties.
Syntax
func (obj *GISBReceiver) ParseFormData() error
Remarks
Invoking ParseFormData scans the form data, allowing you to determine the identity of the sender. The following properties will be populated: DataFrom, DataTo, EDIType, GISBVersion, and ReceiptType. ParseRequest may be used to read the entire message.
If RequestHeaders is empty and Request contains both the headers and the message, Request will be split and stored in Request and RequestHeaders as described in the Request's description.
ParseRequest Method (GISBReceiver Component)
Processes the EDI data.
Syntax
func (obj *GISBReceiver) ParseRequest() error
Remarks
Invoking ParseRequest parses the incoming request and attempts to determine the GISBData sent by the client. The method will first parse the form data unless you have already called ParseFormData.
The method will throw an exception if any errors are found. Regardless of success or failure the method will determine an appropriate value for RequestStatus. It is recommended that you catch any exceptions and invoke CreateResponse and SendResponse in case of either success or failure.
Invoking ProcessRequest is equivalent to invoking ParseRequest and then CreateResponse. Calling the methods separately allows you to change the value of RequestStatus before generating the response; for example, you may choose to feed GISBData to an EDI translator before generating a positive response.
ProcessRequest Method (GISBReceiver Component)
Processes the EDI data, and generates the receipt.
Syntax
func (obj *GISBReceiver) ProcessRequest() error
Remarks
Invoking ProcessRequest automates the entire server process. The method scans the request, determines the EDIData, and generates the Response and ResponseHeaders. The method's functionality is the same as the combined functionality of ParseFormData, ParseRequest, and CreateResponse.
The method will throw an exception if any errors are found. However, the Response will still be generated and will contain information about any errors. It is recommended that you catch any exceptions and invoke SendResponse in case of either success or failure.
The component will populate EDIData if possible.
ReadRequest Method (GISBReceiver Component)
Reads the AS2 request from the given HTTP servlet request.
Syntax
func (obj *GISBReceiver) ReadRequest() error
Remarks
In the Java edition, reads the request from the specified HttpServletRequest. The request will be stored in Request and the headers in RequestHeaders. ParseRequest may then be invoked.
In versions other than Java, this method has no effect.
Reset Method (GISBReceiver Component)
Resets the state of the control.
Syntax
func (obj *GISBReceiver) Reset() error
Remarks
Reset resets the state of the component. All properties will be set to their default values.
SendResponse Method (GISBReceiver Component)
In a server environment, responds to the requesting client.
Syntax
func (obj *GISBReceiver) SendResponse() error
Remarks
When called from within a server environment, SendResponse will respond to the requesting client with the Response. The Response may be a simple HTML block (this will always be the case in version 1.4) or a GISB-Acknowledgement-Receipt, if requested by the client.
The exact behavior of the method is specific to the environment. In ASP or ASP.NET, the receipt will be sent within the current HTTP context. In Java, the receipt will be sent within the provided HttpServletResponse. Otherwise, the receipt will be directed to stdout. If this is impossible an exception will be thrown.
This method should only be invoked after Response has been generated by CreateResponse or ProcessRequest.
SetPGPParam Method (GISBReceiver Component)
Sets a parameter in the PGP provider.
Syntax
func (obj *GISBReceiver) SetPGPParam(Name string, Value string) error
Remarks
Invoke SetPGPParam to set parameters of your PGP provider. Please refer to the documentation provided with the PGP provider for the parameters required.
The following table defines possible values that may be passed to the SetPGPParam.
| homedir | The directory containing the public keyring, secret keyring and trust database. Please note this defaults to the application preferences directory of the user, hence if the GNUPG provider is being used from a ASP.NET application, homedir should be specified. |
| passphrase | The passphrase to access the secret keys in the secret-keyring. |
| userid | The identifier used to identify a secret key within the secret-keyring. Note: When decrypting if this value is not specified the component will attempt to find the key within the keyring automatically based on information available in the PGP message itself. |
| recipient-userid | The identifier used to identify a public key within the public keyring. Note: When verifying a signature if this value is not specified the component will attempt to find the key within the keyring automatically based on information available in the PGP message itself. |
| timeout | The timeout in milliseconds that the provider will wait for a response from the OpenPGP executable. The default is 5000 (5 seconds). |
| usetempfile | If set to "true" the provider will write data to be processed to a temporary file on disk. This is useful when working with large files or binary files. |
| signingalgorithm | The signing algorithm to use when SignData is True. Possible values are:
|
| encryptingalgorithm | The encrypting algorithm to use when EncryptData is True. Possible values are:
|
| compressionmethod | The compression method to use. Possible values are:
|
Error Event (GISBReceiver Component)
Fired when information is available about errors during data delivery.
Syntax
// GISBReceiverErrorEventArgs carries the GISBReceiver Error event's parameters.
type GISBReceiverErrorEventArgs struct {...}
func (args *GISBReceiverErrorEventArgs) ErrorCode() int32
func (args *GISBReceiverErrorEventArgs) Description() string
// GISBReceiverErrorEvent defines the signature of the GISBReceiver Error event's handler function.
type GISBReceiverErrorEvent func(sender *GISBReceiver, args *GISBReceiverErrorEventArgs)
func (obj *GISBReceiver) GetOnErrorHandler() GISBReceiverErrorEvent
func (obj *GISBReceiver) SetOnErrorHandler(handlerFunc GISBReceiverErrorEvent)
Remarks
The Error event is fired in case of exceptional conditions during message processing. Normally the component fails with an error.
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.
Log Event (GISBReceiver Component)
Fired with log information while processing a message.
Syntax
// GISBReceiverLogEventArgs carries the GISBReceiver Log event's parameters.
type GISBReceiverLogEventArgs struct {...}
func (args *GISBReceiverLogEventArgs) LogType() string
func (args *GISBReceiverLogEventArgs) LogMessage() []byte
// GISBReceiverLogEvent defines the signature of the GISBReceiver Log event's handler function.
type GISBReceiverLogEvent func(sender *GISBReceiver, args *GISBReceiverLogEventArgs)
func (obj *GISBReceiver) GetOnLogHandler() GISBReceiverLogEvent
func (obj *GISBReceiver) SetOnLogHandler(handlerFunc GISBReceiverLogEvent)
Remarks
This event fires once for each log message generated by the component. The verbosity is controlled by the LogLevel setting.
Log messages available through this event correspond to log files written to LogDirectory. This event provides a way to obtain log messages without relying on files on disk. This event fires regardless of the value of LogDirectory (i.e. when LogDirectory is empty the event will still fire).
The LogMessage event parameter holds the raw log data.
The LogType event parameter indicates the type of log. Possible values are:
| "LOG" | Information about the status of the process. |
| "ERR" | An error was encountered. |
| "DAT" | The EDI payload. |
| "REQ" | The raw request |
| "MDN" | The MDN response. |
| "DEBUG" | Debug information. |
| "DAT.INPUT" | Debug information when processing payload. Only applicable when LogDebug is True. |
| "DAT.ENCRYPT" | Debug information when processing payload. Only applicable when LogDebug is True. |
| "DAT.COMPRESS" | Debug information when processing payload. Only applicable when LogDebug is True. |
| "DAT.SIGN" | Debug information when processing payload. Only applicable when LogDebug is True. |
| "DAT.DECRYPT" | Debug information when processing payload. Only applicable when LogDebug is True. |
| "DAT.DECOMPRESS" | Debug information when processing payload. Only applicable when LogDebug is True. |
| "DAT.VERIFY" | Debug information when processing payload. Only applicable when LogDebug is True. |
| "DAT.DEBUG" | Debug information when processing payload. Only applicable when LogDebug is True. |
Config Settings (GISBReceiver 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.GISBReceiver Config Settings
Note that only the base name should be specified as the component will append the appropriate file extension.
| 0 (None) | No events are logged. |
| 1 (Info - default) | Informational events are logged. |
| 2 (Verbose) | Detailed data is logged. |
| 3 (Debug) | Debug data is logged. |
The default value is False.
The default value is False.
Default: yyyyMMddhhmmss
Base Config Settings
The following is a list of valid code page identifiers:
| Identifier | Name |
| 037 | IBM EBCDIC - U.S./Canada |
| 437 | OEM - United States |
| 500 | IBM EBCDIC - International |
| 708 | Arabic - ASMO 708 |
| 709 | Arabic - ASMO 449+, BCON V4 |
| 710 | Arabic - Transparent Arabic |
| 720 | Arabic - Transparent ASMO |
| 737 | OEM - Greek (formerly 437G) |
| 775 | OEM - Baltic |
| 850 | OEM - Multilingual Latin I |
| 852 | OEM - Latin II |
| 855 | OEM - Cyrillic (primarily Russian) |
| 857 | OEM - Turkish |
| 858 | OEM - Multilingual Latin I + Euro symbol |
| 860 | OEM - Portuguese |
| 861 | OEM - Icelandic |
| 862 | OEM - Hebrew |
| 863 | OEM - Canadian-French |
| 864 | OEM - Arabic |
| 865 | OEM - Nordic |
| 866 | OEM - Russian |
| 869 | OEM - Modern Greek |
| 870 | IBM EBCDIC - Multilingual/ROECE (Latin-2) |
| 874 | ANSI/OEM - Thai (same as 28605, ISO 8859-15) |
| 875 | IBM EBCDIC - Modern Greek |
| 932 | ANSI/OEM - Japanese, Shift-JIS |
| 936 | ANSI/OEM - Simplified Chinese (PRC, Singapore) |
| 949 | ANSI/OEM - Korean (Unified Hangul Code) |
| 950 | ANSI/OEM - Traditional Chinese (Taiwan; Hong Kong SAR, PRC) |
| 1026 | IBM EBCDIC - Turkish (Latin-5) |
| 1047 | IBM EBCDIC - Latin 1/Open System |
| 1140 | IBM EBCDIC - U.S./Canada (037 + Euro symbol) |
| 1141 | IBM EBCDIC - Germany (20273 + Euro symbol) |
| 1142 | IBM EBCDIC - Denmark/Norway (20277 + Euro symbol) |
| 1143 | IBM EBCDIC - Finland/Sweden (20278 + Euro symbol) |
| 1144 | IBM EBCDIC - Italy (20280 + Euro symbol) |
| 1145 | IBM EBCDIC - Latin America/Spain (20284 + Euro symbol) |
| 1146 | IBM EBCDIC - United Kingdom (20285 + Euro symbol) |
| 1147 | IBM EBCDIC - France (20297 + Euro symbol) |
| 1148 | IBM EBCDIC - International (500 + Euro symbol) |
| 1149 | IBM EBCDIC - Icelandic (20871 + Euro symbol) |
| 1200 | Unicode UCS-2 Little-Endian (BMP of ISO 10646) |
| 1201 | Unicode UCS-2 Big-Endian |
| 1250 | ANSI - Central European |
| 1251 | ANSI - Cyrillic |
| 1252 | ANSI - Latin I |
| 1253 | ANSI - Greek |
| 1254 | ANSI - Turkish |
| 1255 | ANSI - Hebrew |
| 1256 | ANSI - Arabic |
| 1257 | ANSI - Baltic |
| 1258 | ANSI/OEM - Vietnamese |
| 1361 | Korean (Johab) |
| 10000 | MAC - Roman |
| 10001 | MAC - Japanese |
| 10002 | MAC - Traditional Chinese (Big5) |
| 10003 | MAC - Korean |
| 10004 | MAC - Arabic |
| 10005 | MAC - Hebrew |
| 10006 | MAC - Greek I |
| 10007 | MAC - Cyrillic |
| 10008 | MAC - Simplified Chinese (GB 2312) |
| 10010 | MAC - Romania |
| 10017 | MAC - Ukraine |
| 10021 | MAC - Thai |
| 10029 | MAC - Latin II |
| 10079 | MAC - Icelandic |
| 10081 | MAC - Turkish |
| 10082 | MAC - Croatia |
| 12000 | Unicode UCS-4 Little-Endian |
| 12001 | Unicode UCS-4 Big-Endian |
| 20000 | CNS - Taiwan |
| 20001 | TCA - Taiwan |
| 20002 | Eten - Taiwan |
| 20003 | IBM5550 - Taiwan |
| 20004 | TeleText - Taiwan |
| 20005 | Wang - Taiwan |
| 20105 | IA5 IRV International Alphabet No. 5 (7-bit) |
| 20106 | IA5 German (7-bit) |
| 20107 | IA5 Swedish (7-bit) |
| 20108 | IA5 Norwegian (7-bit) |
| 20127 | US-ASCII (7-bit) |
| 20261 | T.61 |
| 20269 | ISO 6937 Non-Spacing Accent |
| 20273 | IBM EBCDIC - Germany |
| 20277 | IBM EBCDIC - Denmark/Norway |
| 20278 | IBM EBCDIC - Finland/Sweden |
| 20280 | IBM EBCDIC - Italy |
| 20284 | IBM EBCDIC - Latin America/Spain |
| 20285 | IBM EBCDIC - United Kingdom |
| 20290 | IBM EBCDIC - Japanese Katakana Extended |
| 20297 | IBM EBCDIC - France |
| 20420 | IBM EBCDIC - Arabic |
| 20423 | IBM EBCDIC - Greek |
| 20424 | IBM EBCDIC - Hebrew |
| 20833 | IBM EBCDIC - Korean Extended |
| 20838 | IBM EBCDIC - Thai |
| 20866 | Russian - KOI8-R |
| 20871 | IBM EBCDIC - Icelandic |
| 20880 | IBM EBCDIC - Cyrillic (Russian) |
| 20905 | IBM EBCDIC - Turkish |
| 20924 | IBM EBCDIC - Latin-1/Open System (1047 + Euro symbol) |
| 20932 | JIS X 0208-1990 & 0121-1990 |
| 20936 | Simplified Chinese (GB2312) |
| 21025 | IBM EBCDIC - Cyrillic (Serbian, Bulgarian) |
| 21027 | Extended Alpha Lowercase |
| 21866 | Ukrainian (KOI8-U) |
| 28591 | ISO 8859-1 Latin I |
| 28592 | ISO 8859-2 Central Europe |
| 28593 | ISO 8859-3 Latin 3 |
| 28594 | ISO 8859-4 Baltic |
| 28595 | ISO 8859-5 Cyrillic |
| 28596 | ISO 8859-6 Arabic |
| 28597 | ISO 8859-7 Greek |
| 28598 | ISO 8859-8 Hebrew |
| 28599 | ISO 8859-9 Latin 5 |
| 28605 | ISO 8859-15 Latin 9 |
| 29001 | Europa 3 |
| 38598 | ISO 8859-8 Hebrew |
| 50220 | ISO 2022 Japanese with no halfwidth Katakana |
| 50221 | ISO 2022 Japanese with halfwidth Katakana |
| 50222 | ISO 2022 Japanese JIS X 0201-1989 |
| 50225 | ISO 2022 Korean |
| 50227 | ISO 2022 Simplified Chinese |
| 50229 | ISO 2022 Traditional Chinese |
| 50930 | Japanese (Katakana) Extended |
| 50931 | US/Canada and Japanese |
| 50933 | Korean Extended and Korean |
| 50935 | Simplified Chinese Extended and Simplified Chinese |
| 50936 | Simplified Chinese |
| 50937 | US/Canada and Traditional Chinese |
| 50939 | Japanese (Latin) Extended and Japanese |
| 51932 | EUC - Japanese |
| 51936 | EUC - Simplified Chinese |
| 51949 | EUC - Korean |
| 51950 | EUC - Traditional Chinese |
| 52936 | HZ-GB2312 Simplified Chinese |
| 54936 | Windows XP: GB18030 Simplified Chinese (4 Byte) |
| 57002 | ISCII Devanagari |
| 57003 | ISCII Bengali |
| 57004 | ISCII Tamil |
| 57005 | ISCII Telugu |
| 57006 | ISCII Assamese |
| 57007 | ISCII Oriya |
| 57008 | ISCII Kannada |
| 57009 | ISCII Malayalam |
| 57010 | ISCII Gujarati |
| 57011 | ISCII Punjabi |
| 65000 | Unicode UTF-7 |
| 65001 | Unicode UTF-8 |
| Identifier | Name |
| 1 | ASCII |
| 2 | NEXTSTEP |
| 3 | JapaneseEUC |
| 4 | UTF8 |
| 5 | ISOLatin1 |
| 6 | Symbol |
| 7 | NonLossyASCII |
| 8 | ShiftJIS |
| 9 | ISOLatin2 |
| 10 | Unicode |
| 11 | WindowsCP1251 |
| 12 | WindowsCP1252 |
| 13 | WindowsCP1253 |
| 14 | WindowsCP1254 |
| 15 | WindowsCP1250 |
| 21 | ISO2022JP |
| 30 | MacOSRoman |
| 10 | UTF16String |
| 0x90000100 | UTF16BigEndian |
| 0x94000100 | UTF16LittleEndian |
| 0x8c000100 | UTF32String |
| 0x98000100 | UTF32BigEndian |
| 0x9c000100 | UTF32LittleEndian |
| 65536 | Proprietary |
- 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.
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.
To use the system security libraries for Linux, OpenSSL support must be enabled. For more information on how to enable OpenSSL, please refer to the OpenSSL Notes section.
Trappable Errors (GISBReceiver Component)
GISBReceiver Errors
| 651 | Required field unspecified. |
| 661 | Array index out of bounds. |
| 663 | Invalid receipt-security-selection requested by client. |
| 664 | Data was not processed by PGP. |
| 701 | Unable to write log file. |
| 702 | Invalid request headers. |
| 704 | Invalid request. |
| 705 | There is no response to send. |
| 771 | Unable to send the response. |
| 721 | There is no current HTTP environment. |
| 732 | Unable to verify the signature. |
| 733 | The receipt was signed with an unsupported protocol. |
MIME Errors
| 3 | Can't create the file for write (illegal name or disk is write-protected). |
| 4 | Can't open the file for read (doesn't exist?). |
| 5 | Can't read from file. |
| 6 | Can't write to file (disk full?). |
| 280 | Invalid Part Index. |
| 281 | Unknown MIME type. |
| 282 | No MIME-boundary found. |
| 283 | No file given. |
| 284 | The component is busy. |
| 285 | Can't create a temporary file to decode the data. |
| 286 | Can't read Message file. |
| 287 | No header separator found. |
| 289 | No separator found. |
| 290 | Input stream must have seeking enabled. |