Sam Wong > Net-AS2 > Net::AS2::MDN

Download:
Net-AS2-0.02.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Source  

NAME ^

Net::AS2::MDN - AS2 Message Deposition Notification

SYNOPSIS ^

    ### Sending Message and got a Sync MDN
    my $mdn = $as2->send($body, Type => 'application/xml', MessageId => 'my-message-id-12345@localhost')

    if (!$mdn->is_success) {
        print STDERR $mdn->description;
    }

PUBLIC INTERFACE ^

Constructor

$mdn = Net::AS2::MDN->create_success($message)
$mdn = Net::AS2::MDN->create_success($message, $plain_text)

Create an Net::AS2::MDN indicating processed with transaction information provided by Net::AS2::Message. Optionally with a human readable text.

$mdn = Net::AS2::MDN->create_warning($message, $status_text)
$mdn = Net::AS2::MDN->create_warning($message, $status_text, $plain_text)

Create an Net::AS2::MDN indicating processed with warnings with transaction information provided by Net::AS2::Message. Optionally with a human readable text.

Status text is required and will goes to the Disposition line. It is limited to printable ASCII.

$mdn = Net::AS2::MDN->create_failure($message, $status_text)
$mdn = Net::AS2::MDN->create_failure($message, $status_text, $plain_text)

Create an Net::AS2::MDN indicating failed/failure status with transaction information provided by Net::AS2::Message. Optionally with a human readable text.

Status text is required and will goes to the Disposition line. It is limited to printable ASCII.

$mdn = Net::AS2::MDN->create_error($message, $status_text)
$mdn = Net::AS2::MDN->create_error($message, $status_text, $plain_text)

Create an Net::AS2::MDN indicating processed/error status with transaction information provided by Net::AS2::Message. Optionally with a human readable text.

Status text is required and will goes to the Disposition line. It is limited to printable ASCII.

$mdn = Net::AS2::MDN->create_from_unsuccessful_message($message)

Create a corresponding Net::AS2::MDN for unsuccessful Net::AS2::Message notice generated while receiving and decoding. Message's error text will be used.

Methods

$mdn->match($mic, $alg)

Verify the MDN MIC value with a pre-calculated one to make sure the receiving party got what we sent.

The MDN will be marked is_error if the MICs do not match.

    $mdn->match($mic, 'sha1');
    if ($mdn->is_success) {
        # still success after comparing mic
    }
$mdn->is_success

Indicating a successfully processed status. (This returns true even with warning was presented)

$mdn->with_warning

Indicating the message was processed with warning.

$mdn->is_failure

Indicating a failed/failure status.

$mdn->is_error

Indicating a processed/error status

$mdn->is_unparsable

Indicating the MDN was unparsable

$mdn->status_text

The machine readable text follows the Disposition status

$mdn->async_url

The URL where the MDN was requested to sent to

$mdn->should_sign

Returns true if the MDN was requested to be signed

$mdn->recipient

Returns the AS2 name of the final recipient field of the MDN

$mdn->original_message_id

Returns the Original-Message-Id field of the MDN

$mdn->description

Returns a concatenated text message of the MDN status, machine readable text and human readable text.

$mdn->as_mime

Returns a multipart/report MIME::Entity representation of the MDN

SEE ALSO ^

Net::AS2, MIME::Entity

syntax highlighting: