IPWorks EDI 2020 Kotlin Edition

Questions / Feedback?

Post Method

Post data to the AS2 server, and check the receipt.

Syntax

public fun post()

Remarks

Post data to the server. The reply will also be checked, and if a synchronous MDN was requested (i.e., MDNTo is not empty), it will be validated. After the method finishes, the MDNReceipt, ReceiptSigningProtocol, and ReceiptSignerCert properties will be populated with the appropriate values.

The method operates synchronously, and will throw an exception if any errors or warnings occur. Errors might include a failure to decrypt or authenticate the receipt, the absence of an MDN when one was requested, TCP/IP errors, or any errors reported by the server in the MDN. Warnings might include the return of an unsigned receipt when a signed receipt was requested, or other warnings reported by the server in the MDN.

If an exception is thrown the error code will correspond to the severity of the warning or error, allowing client software to determine whether or not to accept the reply. If multiple errors occur, the exception will return a special error code, and the error message will contain a line for each error's code and description; i.e. "423: Failed to authenticate sender". If the error(s) is/are not fatal processing will not be interrupted, and the relevant properties will be populated as normal.

Copyright (c) 2021 /n software inc. - All rights reserved.
IPWorks EDI 2020 Kotlin Edition - Version 20.0 [Build 8033]