The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Net::AS2::Message - AS2 incoming message

SYNOPSIS

    ### Receiving Message and sending MDN
    my $message = $as2->decode_messages($headers, $post_body);
    if ($message->is_success) {
        print $message->content;
    }

PUBLIC INTERFACE

Constructor

$msg = Net::AS2::Message->create_from_serialized_state($state)

Create an Net::AS2::Message from a serialized state data returned from serialized_state

Methods

$msg->is_success

Returns if the message was successfully parsed. content and mic would be available.

$msg->is_error

Returns if the message was failed to parse. error_status_text and error_plain_text would be available.

$msg->is_failure

Returns if the message was parsed but failed in further processing, e.g. unsupported algorithm request . error_status_text and error_plain_text would be available.

$msg->is_mdn_async

Returns if the partner wants to have the MDN sent in ASYNC. async_url would be available.

$msg->should_mdn_sign

Returns if the partner wants to have the MDN signed.

$msg->message_id

Returns the message id of this message. This could be undefined in some failure mode.

$msg->content

Returns the encoded content (binary) of the message. This is only defined when is_success is true.

$msg->mic

Returns the SHA-1 MIC of the message. This is only defined when is_success is true.

$msg->error_status_text

Dedicated short error text that should goes into machine readable report in the MDN.

$msg->error_plain_text

Error text that goes into human readable report in the MDN.

$msg->async_url

Returns the url that partner wants us to send MDN to.

$msg->serialized_state

Returns the serialized state of this message.

This is usually used for passing Net::AS2::Message to another process for sending ASYNC MDN.

SEE ALSO

Net::AS2