GISBReceiver Class
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 class 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 class 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 class 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 class 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 class 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 class 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 class with short descriptions. Click on the links for further details.
DataElements | Collection of data elements for the client's request. |
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. |
GISBData | The EDI Payload of the message. |
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 class 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 class 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 class 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. |
GUIAvailable | Whether or not a message loop is available for processing events. |
LicenseInfo | Information about the current license. |
MaskSensitiveData | Whether sensitive data is masked in log messages. |
UseDaemonThreads | Whether threads created by the class are daemon threads. |
UseFIPSCompliantAPI | Tells the class whether or not to use FIPS certified APIs. |
UseInternalSecurityAPI | Whether or not to use the system security libraries or an internal implementation. |
DataElements Property (GISBReceiver Class)
Collection of data elements for the client's request.
Syntax
public GISBElementList getDataElements(); public void setDataElements(GISBElementList dataElements);
Remarks
Data elements will include required elements such as "to", "from", "input-format", etc., and may contain other elements as sent by your trading partner.
This property is not available at design time.
Please refer to the GISBElement type for a complete list of fields.DataFrom Property (GISBReceiver Class)
The identity of the sending system.
Syntax
public String getDataFrom();
Default Value
""
Remarks
Will generally be the DUNS number of the sending trading partner.
This property is read-only.
DataTo Property (GISBReceiver Class)
The identity of the receiving system.
Syntax
public String getDataTo();
Default Value
""
Remarks
Will generally be the DUNS number of the receiving trading partner.
This property is read-only.
ErrorMessage Property (GISBReceiver Class)
If the client sent an error notification, the error message.
Syntax
public String getErrorMessage();
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.
GISBData Property (GISBReceiver Class)
The EDI Payload of the message.
Syntax
public GISBData getGISBData();
Remarks
The EDI Payload of the message.
This property is read-only.
Please refer to the GISBData type for a complete list of fields.GISBVersion Property (GISBReceiver Class)
The version of the GISB/NAESB protocol used.
Syntax
public String getGISBVersion();
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.
LogDirectory Property (GISBReceiver Class)
The path to a directory for logging.
Syntax
public String getLogDirectory(); public void setLogDirectory(String logDirectory);
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 class 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 class. 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.
LogFile Property (GISBReceiver Class)
The log file written.
Syntax
public String getLogFile();
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.
PublicKeyringData Property (GISBReceiver Class)
Public keyring data.
Syntax
public byte[] getPublicKeyringData(); public void setPublicKeyringData(byte[] publicKeyringData);
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.
ReceiptSigningProtocol Property (GISBReceiver Class)
The protocol used to sign the receipt, if any.
Syntax
public String getReceiptSigningProtocol(); public void setReceiptSigningProtocol(String receiptSigningProtocol);
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.
ReceiptType Property (GISBReceiver Class)
The type of receipt to be returned, if any.
Syntax
public String getReceiptType();
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 class 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.
Request Property (GISBReceiver Class)
The HTTP request to be processed.
Syntax
public byte[] getRequest(); public void setRequest(byte[] request);
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.
This property is not available at design time.
RequestHeaders Property (GISBReceiver Class)
The HTTP headers in the request.
Syntax
public String getRequestHeaders(); public void setRequestHeaders(String requestHeaders);
Default Value
""
Remarks
The entire list of HTTP and MIME headers.
RequestStatus Property (GISBReceiver Class)
The status of the request.
Syntax
public String getRequestStatus(); public void setRequestStatus(String requestStatus);
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 class. Other types of errors are by mutual agreement. In particular the use of message security is not enforced by the class 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 class 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
Response Property (GISBReceiver Class)
The response generated by the class.
Syntax
public byte[] getResponse();
Default Value
""
Remarks
The response generated by the class 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.
ResponseHeaders Property (GISBReceiver Class)
The response headers generated by the class.
Syntax
public String getResponseHeaders();
Default Value
""
Remarks
The response headers generated by the class 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.
SecretKeyringData Property (GISBReceiver Class)
Secret keyring data.
Syntax
public byte[] getSecretKeyringData(); public void setSecretKeyringData(byte[] secretKeyringData);
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.
ServerId Property (GISBReceiver Class)
The ID of your server.
Syntax
public String getServerId(); public void setServerId(String serverId);
Default Value
""
Remarks
The ID of your server, as it will be described in the response. If you do not specify ServerId the class will attempt to determine it when you call ProcessRequest or CreateResponse.
TransactionId Property (GISBReceiver Class)
The transaction ID of the message.
Syntax
public String getTransactionId(); public void setTransactionId(String transactionId);
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 class 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.
Config Method (GISBReceiver Class)
Sets or retrieves a configuration setting.
Syntax
public String config(String configurationString);
Remarks
Config is a generic method available in every class. It is used to set and retrieve configuration settings for the class.
These settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the class, 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 Class)
Creates the response.
Syntax
public void createResponse();
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 Class)
Processes the form data, and populates the appropriate properties.
Syntax
public void parseFormData();
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 Class)
Processes the EDI data.
Syntax
public void parseRequest();
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 Class)
Processes the EDI data, and generates the receipt.
Syntax
public void processRequest();
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 class will populate EDIData if possible.
ReadRequest Method (GISBReceiver Class)
Reads the AS2 request from the given HTTP servlet request.
Syntax
public void readRequest(Object request);
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 Class)
Resets the state of the control.
Syntax
public void reset();
Remarks
Reset resets the state of the class. All properties will be set to their default values.
SendResponse Method (GISBReceiver Class)
In a server environment, responds to the requesting client.
Syntax
public void sendResponse(Object response);
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 Class)
Sets a parameter in the PGP provider.
Syntax
public void setPGPParam(String name, String value);
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 class 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 class 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 Class)
Fired when information is available about errors during data delivery.
Syntax
public class DefaultGISBReceiverEventListener implements GISBReceiverEventListener { ... public void error(GISBReceiverErrorEvent e) {} ... } public class GISBReceiverErrorEvent { public int errorCode; public String description; }
Remarks
The Error event is fired in case of exceptional conditions during message processing. Normally the class 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.
Log Event (GISBReceiver Class)
Fired with log information while processing a message.
Syntax
public class DefaultGISBReceiverEventListener implements GISBReceiverEventListener { ... public void log(GISBReceiverLogEvent e) {} ... } public class GISBReceiverLogEvent { public String logType; public byte[] logMessage; }
Remarks
This event fires once for each log message generated by the class. 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. |
GISBData Type
The EDI payload of the message.
Remarks
The EDI payload of the message.
Fields
Data
String
Default Value: ""
This field contains the EDI payload of the transmission.
In a receiver, this field will only be populated if OutputStream has not been specified and ParseRequest finishes without an error. Data will contain the full decrypted text of the EDI message.
DataB
byte[]
Default Value: ""
This field contains the EDI payload of the transmission.
In a receiver, this field will only be populated if OutputStream has not been specified and ParseRequest finishes without an error. Data will contain the full decrypted text of the EDI message.
EDIType
String
Default Value: "X12"
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.
FileName
String
Default Value: ""
In a sender, if FileName is specified, the file specified will be used for the EDI payload of the transmission. Name will be populated with the name of the file.
In a receiver, if this field 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 OutputStream is set, the data will be written to the stream and this field will not be populated.
InputStream
java.io.InputStream
Default Value: ""
In a sender, if InputStream is specified, the data from the specified stream will be used for the EDI payload of the transmission.
Name
String
Default Value: "rfc1767.edi"
Name is the final name to be associated with the contents of either the Data or FileName fields. This corresponds to the filename attribute of the Content-Disposition header for the EDI payload.
When constructing EDI data to be sent, Name will be set to the same value as FileName, but can be overridden after setting FileName to indicate that another name should be used in the outbound request's Content-Disposition MIME header.
When receiving EDI data, Name will be read out of the "filename" attribute of the inbound request's Content-Disposition MIME header.
OutputStream
java.io.OutputStream
Default Value: ""
In a receiver, if this field is set, the EDI payload will be written to this stream if ParseRequest finishes without an error. The specified stream will contain the full decrypted text of the EDI message.
Constructors
public GISBData();
public GISBData( data, EDIType);
public GISBData( fileName, EDIType);
GISBElement Type
A name-value pair for extra data to be sent with a GISB message.
Remarks
A name-value pair for extra data to be sent with a GISB message.
Fields
Name
String
Default Value: ""
The name of the current data element.
Value
String
Default Value: ""
The value of the current data element.
Constructors
public GISBElement();
public GISBElement( name, value);
Config Settings (GISBReceiver Class)
The class 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 class, 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
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 class does not attempt to process external events.
- 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.
This setting only works on these classes: AS3Receiver, AS3Sender, Atom, Client(3DS), FTP, FTPServer, IMAP, OFTPClient, SSHClient, SCP, Server(3DS), Sexec, SFTP, SFTPServer, SSHServer, TCPClient, TCPServer.
The Java edition requires installation of the FIPS-certified Bouncy Castle library regardless of the target operating system. This can be downloaded from https://www.bouncycastle.org/fips-java/. Only the "Provider" library is needed. The jar file should then be installed in a JRE search path.
The following classes must be imported in the application in which the component will be used:
import java.security.Security;
import org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider;
The Bouncy Castle provider must be added as a valid provider and must also be configured to operate in FIPS mode:
System.setProperty("org.bouncycastle.fips.approved_only","true");
Security.addProvider(new BouncyCastleFipsProvider());
When UseFIPSCompliantAPI is true, Secure Sockets Layer (SSL)-enabled classes can optionally be configured to use the Transport Layer Security (TLS) Bouncy Castle library. When SSLProvider is set to sslpAutomatic (default) or sslpInternal, an internal TLS implementation is used, but all cryptographic operations are offloaded to the Bouncy Castle FIPS provider to achieve FIPS-compliant operation. If SSLProvider is set to sslpPlatform, the Bouncy Castle JSSE will be used in place of the internal TLS implementation.
To enable the use of the Bouncy Castle JSSE take the following steps in addition to the steps above. Both the Bouncy Castle FIPS provider and the Bouncy Castle JSSE must be configured to use the Bouncy Castle TLS library in FIPS mode. Obtain the Bouncy Castle TLS library from https://www.bouncycastle.org/fips-java/. The jar file should then be installed in a JRE search path.
The following classes must be imported in the application in which the component will be used:
import java.security.Security;
import org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider;
//required to use BCJSSE when SSLProvider is set to sslpPlatform
import org.bouncycastle.jsse.provider.BouncyCastleJsseProvider;
The Bouncy Castle provider must be added as a valid provider and also must be configured to operate in FIPS mode:
System.setProperty("org.bouncycastle.fips.approved_only","true");
Security.addProvider(new BouncyCastleFipsProvider());
//required to use BCJSSE when SSLProvider is set to sslpPlatform
Security.addProvider(new BouncyCastleJsseProvider("fips:BCFIPS"));
//optional - configure logging level of BCJSSE
Logger.getLogger("org.bouncycastle.jsse").setLevel(java.util.logging.Level.OFF);
//configure the class to use BCJSSE
component.setSSLProvider(1); //platform
component.config("UseFIPSCompliantAPI=true");
Note: TLS 1.3 support requires the Bouncy Castle TLS library version 1.0.14 or later.
FIPS mode can be enabled by setting the UseFIPSCompliantAPI configuration setting to true. This is a static setting that applies to all instances of all classes 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: Enabling FIPS compliance requires a special license; please contact sales@nsoftware.com for details.
Setting this configuration setting to true tells the class to use the internal implementation instead of using the system security libraries.
This setting is set to false by default on all platforms.
Trappable Errors (GISBReceiver Class)
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 class 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. |