ProcessRequest Method

Processes the EDI data, and generates the receipt.

Syntax

int ProcessRequest();

Remarks

Invoking ProcessRequest automates the entire AS2 server process. The method scans the request, determines the EDIData, and generates the MDNReceipt. In a server environment the receipt may be returned by invoking SendResponse.

The method's functionality is the same as the combined functionality of ParseRequest and CreateMDNReceipt. The method's operation is controlled by ErrorProcessingFlags and ErrorReportingFlags, and ScanResult will be populated as in ParseRequest.

The method will throw an exception, as ParseRequest does, if a problem is found while processing the request. However, if the problem does not prevent an MDN from being generated, MDNReceipt will still be generated before the exception is thrown. In all cases, the receipt will be suitable for returning to the client. If an exception is thrown, the MDNReceipt will provide more detail on the cause of the error.

The class will populate EDIData if no errors occurred scanning the request, or if ErrorProcessingFlags had been previously configured to allow the error.

Error Handling

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

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