MDNReceipt Property

The MDN receipt returned from the server.

Syntax

public MDNReceipt getMDNReceipt();
public void setMDNReceipt(MDNReceipt MDNReceipt);

Remarks

This property will contain an instance of MDNReceipt with the complete MDN receipt returned from the AS2 receiver. The receipt will be a signed or unsigned multipart/report in MIME format. For synchronous MDN requests, this property is populated automatically after the call to Post. If an asynchronous MDN is sent over HTTP, it may be read from the HTTP context by calling ReadAsyncReceipt, or it may be set manually.

When MDNReceipt is set to a valid MDN receipt, the originator of the receipt will be stored in AS2To, the intended recipient (presumably your system) will be stored in AS2From, and the original message ID will be stored in MessageId.

If you are processing a MDN receipt asynchronously, you can use the values to look up the original message and validate the receipt. Set the OriginalContentMIC, MDNOptions, and ReceiptSignerCert to the values originally computed when the message was sent (if you are requesting async MDNs you must save this information externally.). You can then validate the asynchronous receipt by invoking VerifyReceipt.

Alternatively, AsyncMDNInfoDir may be set in place of OriginalContentMIC, MessageId, and MDNOptions (provided it was set to the same value when the message was sent). If AsyncMDNInfoDir was specified when the message was sent, the class would have saved OriginalContentMIC and MDNOptions to a file identified by the MessageId for the transmission. These properties are read from the file matching the MessageId in the MDNReceipt automatically if AsyncMDNInfoDir is specified.

Note: MDNReceipt must be populated prior to calling VerifyReceipt.

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